Trait EdgeReferenceMut

Source
pub trait EdgeReferenceMut<'graph, Graph>: EdgeReference<'graph, Graph>
where Graph: Graph,
{ type MutationListener<'reference>: MutationListener<'reference, Graph::Edge>; // Required methods fn weight_mut(&mut self) -> &mut Graph::Edge; fn project_mut<'reference, T: ProjectMut<'reference, <Graph as Graph>::Edge, Self::MutationListener<'reference>>>( &'reference mut self, ) -> Option<T>; }
Expand description

A mutable reference to an edge in a graph. This trait extends the EdgeReference trait and provides a method to obtain a mutable reference to the weight of the edge.

Required Associated Types§

Source

type MutationListener<'reference>: MutationListener<'reference, Graph::Edge>

Required Methods§

Source

fn weight_mut(&mut self) -> &mut Graph::Edge

Get the raw mutable vertex weight. WARNING! It is advised to use the generated projections to get a typed reference to the vertex and use the set_ methods instead. It is only safe to use this if you are mutating non-indexed fields. Incorrect usage of this method will result in graph indexes being corrupted.

Source

fn project_mut<'reference, T: ProjectMut<'reference, <Graph as Graph>::Edge, Self::MutationListener<'reference>>>( &'reference mut self, ) -> Option<T>

Project the element to a mutation safe struct representing a single labelled edge. Modifications to the projection will be reflected in graph indexes.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§