pub trait Node<'graph> {
type Graph: Graph;
// Required methods
fn new(
id: <Self::Graph as Graph>::NodeId,
graph: &'graph Self::Graph,
) -> Self;
fn id(&self) -> <Self::Graph as Graph>::NodeId;
fn graph(&self) -> &'graph Self::Graph;
fn edge_ids(
&self,
) -> &'graph HashSet<<Self::Graph as Graph>::EdgeId, <Self::Graph as Graph>::Hasher>;
fn edge_count(&self) -> usize;
// Provided methods
fn is_leaf(&self) -> bool { ... }
fn edges(&self) -> Iter<'graph, EdgeMode, Self::Graph> ⓘ { ... }
fn children(&self) -> Iter<'graph, ChildMode, Self::Graph> ⓘ { ... }
fn parents(&self) -> Iter<'graph, ParentMode, Self::Graph> ⓘ { ... }
}Required Associated Types§
Required Methods§
fn new(id: <Self::Graph as Graph>::NodeId, graph: &'graph Self::Graph) -> Self
Sourcefn edge_ids(
&self,
) -> &'graph HashSet<<Self::Graph as Graph>::EdgeId, <Self::Graph as Graph>::Hasher>
fn edge_ids( &self, ) -> &'graph HashSet<<Self::Graph as Graph>::EdgeId, <Self::Graph as Graph>::Hasher>
Retrieve the ids of all edges incident to this node.
Sourcefn edge_count(&self) -> usize
fn edge_count(&self) -> usize
Returns the number of incident edges for this node.
Provided Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".