pub trait ProjectMut<'reference, Weight, MutationListener>{
// Required method
fn project_mut(
weight: &'reference mut Weight,
mutation_listener: MutationListener,
) -> Option<Self>;
}
Expand description
Enables projecting a graph element weight to a mutable specific type.
This trait provides a mechanism to safely convert a generic graph element (vertex or edge) to a specific, strongly-typed mutable representation. Changes to the projected type will be tracked using the mutation listener.
§Type Parameters
'reference
: The lifetime of the mutable reference to the weightWeight
: The type of the element weight being projectedMutationListener
: A type that listens for mutations to track index updates
Required Methods§
Sourcefn project_mut(
weight: &'reference mut Weight,
mutation_listener: MutationListener,
) -> Option<Self>
fn project_mut( weight: &'reference mut Weight, mutation_listener: MutationListener, ) -> Option<Self>
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.