Trait petgraph::data::DataMapMut

source ·
pub trait DataMapMut: DataMap {
    // Required methods
    fn node_weight_mut(
        &mut self,
        id: Self::NodeId,
    ) -> Option<&mut Self::NodeWeight>;
    fn edge_weight_mut(
        &mut self,
        id: Self::EdgeId,
    ) -> Option<&mut Self::EdgeWeight>;
}
Expand description

Access node and edge weights mutably.

Required Methods§

source

fn node_weight_mut(&mut self, id: Self::NodeId) -> Option<&mut Self::NodeWeight>

source

fn edge_weight_mut(&mut self, id: Self::EdgeId) -> Option<&mut Self::EdgeWeight>

Implementations on Foreign Types§

source§

impl<'a, G> DataMapMut for &'a mut G
where G: DataMapMut,

source§

fn node_weight_mut(&mut self, id: Self::NodeId) -> Option<&mut Self::NodeWeight>

source§

fn edge_weight_mut(&mut self, id: Self::EdgeId) -> Option<&mut Self::EdgeWeight>

Implementors§

source§

impl<'a, G> DataMapMut for Frozen<'a, G>
where G: DataMapMut,

source§

impl<E, Ix: IndexType> DataMapMut for List<E, Ix>

source§

impl<G> DataMapMut for Reversed<G>
where G: DataMapMut,

source§

impl<N, E, Ty, Ix> DataMapMut for Graph<N, E, Ty, Ix>
where Ty: EdgeType, Ix: IndexType,