petgraph::data

Trait 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,