pub trait DataMap: Data {
// Required methods
fn node_weight(&self, id: Self::NodeId) -> Option<&Self::NodeWeight>;
fn edge_weight(&self, id: Self::EdgeId) -> Option<&Self::EdgeWeight>;
}Expand description
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>
Implementations on Foreign Types§
Source§impl<'a, G> DataMap for &'a Gwhere
G: DataMap,
impl<'a, G> DataMap for &'a Gwhere
G: DataMap,
fn node_weight(&self, id: Self::NodeId) -> Option<&Self::NodeWeight>
fn edge_weight(&self, id: Self::EdgeId) -> Option<&Self::EdgeWeight>
Source§impl<'a, G> DataMap for &'a mut Gwhere
G: DataMap,
impl<'a, G> DataMap for &'a mut Gwhere
G: DataMap,
fn node_weight(&self, id: Self::NodeId) -> Option<&Self::NodeWeight>
fn edge_weight(&self, id: Self::EdgeId) -> Option<&Self::EdgeWeight>
Implementors§
impl<'a, G> DataMap for Frozen<'a, G>where
G: DataMap,
impl<E, Ix: IndexType> DataMap for List<E, Ix>
impl<G> DataMap for Reversed<G>where
G: DataMap,
impl<G, F> DataMap for NodeFiltered<G, F>
impl<G: Visitable + DataMap> DataMap for Acyclic<G>
impl<N, E, Ty, Ix> DataMap for Graph<N, E, Ty, Ix>
impl<N, E, Ty, Ix> DataMap for StableGraph<N, E, Ty, Ix>
Available on crate feature
stable_graph only.