GraphNodeId

Trait GraphNodeId 

Source
pub trait GraphNodeId:
    Copy
    + Eq
    + Hash
    + Ord
    + Debug {
    type Adjacent: Copy + Debug + From<(Self, Direction)> + Into<(Self, Direction)>;
    type Edge: Copy + Eq + Hash + Debug + From<(Self, Self)> + Into<(Self, Self)>;

    // Required method
    fn kind(&self) -> &'static str;
}
Expand description

Types that can be used as node identifiers in a DiGraph/UnGraph.

Required Associated Types§

Source

type Adjacent: Copy + Debug + From<(Self, Direction)> + Into<(Self, Direction)>

The type that packs and unpacks this GraphNodeId with a Direction. This is used to save space in the graph’s adjacency list.

Source

type Edge: Copy + Eq + Hash + Debug + From<(Self, Self)> + Into<(Self, Self)>

The type that packs and unpacks this GraphNodeId with another GraphNodeId. This is used to save space in the graph’s edge list.

Required Methods§

Source

fn kind(&self) -> &'static str

Name of the kind of this node id.

For structs, this should return a human-readable name of the struct. For enums, this should return a human-readable name of the enum variant.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§