Trait VertexReferenceMut

Source
pub trait VertexReferenceMut<'graph, Graph>: VertexReference<'graph, Graph>
where Graph: Graph + 'graph,
{ type MutationListener<'reference>: MutationListener<'reference, Graph::Vertex>; // Required methods fn weight_mut(&mut self) -> &mut Graph::Vertex; fn project_mut<'reference, T: ProjectMut<'reference, <Graph as Graph>::Vertex, Self::MutationListener<'reference>>>( &'reference mut self, ) -> Option<T>; }

Required Associated Types§

Source

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

Required Methods§

Source

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

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>::Vertex, Self::MutationListener<'reference>>>( &'reference mut self, ) -> Option<T>

Project the element to a mutation safe struct representing a single labelled vertex. 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§