Trait petgraph::data::DataMap
[−]
[src]
pub trait DataMap: Data { fn node_weight(&self, id: Self::NodeId) -> Option<&Self::NodeWeight>; fn edge_weight(&self, id: Self::EdgeId) -> Option<&Self::EdgeWeight>; }
Access node and edge weights (associated data).
Required Methods
fn node_weight(&self, id: Self::NodeId) -> Option<&Self::NodeWeight>
fn edge_weight(&self, id: Self::EdgeId) -> Option<&Self::EdgeWeight>
Implementors
impl<G, F> DataMap for NodeFiltered<G, F> where G: DataMap, F: FilterNode<G::NodeId>
impl<'a, G> DataMap for &'a G where G: DataMap
impl<'a, G> DataMap for &'a mut G where G: DataMap
impl<G> DataMap for Reversed<G> where G: DataMap
impl<N, E, Ty, Ix> DataMap for Graph<N, E, Ty, Ix> where Ty: EdgeType, Ix: IndexType
impl<N, E, Ty, Ix> DataMap for StableGraph<N, E, Ty, Ix> where Ty: EdgeType, Ix: IndexType
impl<'a, G> DataMap for Frozen<'a, G> where G: DataMap