pub trait NodeMut<'graph> {
type Graph: Graph;
// Required methods
fn new(
id: <Self::Graph as Graph>::NodeId,
graph: &'graph mut Self::Graph,
) -> Self;
fn id(&self) -> <Self::Graph as Graph>::NodeId;
fn graph(&mut self) -> &mut Self::Graph;
fn edge_ids(
&self,
) -> &HashSet<<Self::Graph as Graph>::EdgeId, <Self::Graph as Graph>::Hasher>;
fn edge_count(&self) -> usize;
fn add_edge_id(&mut self, edge: <Self::Graph as Graph>::EdgeId);
fn remove_edge_id(&mut self, edge: <Self::Graph as Graph>::EdgeId);
// Provided method
fn as_ref<'a>(&'a mut self) -> <Self::Graph as Graph>::Node<'a>
where 'graph: 'a { ... }
}Required Associated Types§
Required Methods§
fn new( id: <Self::Graph as Graph>::NodeId, graph: &'graph mut Self::Graph, ) -> Self
Sourcefn edge_ids(
&self,
) -> &HashSet<<Self::Graph as Graph>::EdgeId, <Self::Graph as Graph>::Hasher>
fn edge_ids( &self, ) -> &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.
Sourcefn add_edge_id(&mut self, edge: <Self::Graph as Graph>::EdgeId)
fn add_edge_id(&mut self, edge: <Self::Graph as Graph>::EdgeId)
Registers an edge as incident to this node.
Sourcefn remove_edge_id(&mut self, edge: <Self::Graph as Graph>::EdgeId)
fn remove_edge_id(&mut self, edge: <Self::Graph as Graph>::EdgeId)
Removes an edge from this node’s incident edge set.
Provided Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".