Trait petgraph::visit::EdgeRef
[−]
[src]
pub trait EdgeRef: Copy { type NodeId; type EdgeId; type Weight; fn source(&self) -> Self::NodeId; fn target(&self) -> Self::NodeId; fn weight(&self) -> &Self::Weight; fn id(&self) -> Self::EdgeId; }
An edge reference.
Edge references are used by traits IntoEdges
and IntoEdgeReferences
.
Associated Types
Required Methods
fn source(&self) -> Self::NodeId
The source node of the edge.
fn target(&self) -> Self::NodeId
The target node of the edge.
fn weight(&self) -> &Self::Weight
A reference to the weight of the edge.
fn id(&self) -> Self::EdgeId
The edge’s identifier.
Implementors
impl<R> EdgeRef for ReversedEdgeReference<R> where R: EdgeRef
impl<'a, N, E> EdgeRef for (N, N, &'a E) where N: Copy
impl<'a, Ix, E> EdgeRef for EdgeReference<'a, E, Ix> where Ix: IndexType
impl<'a, Ix, E> EdgeRef for EdgeReference<'a, E, Ix> where Ix: IndexType
impl<'a, E, Ty, Ix> EdgeRef for EdgeReference<'a, E, Ty, Ix> where Ty: EdgeType, Ix: IndexType