pub trait Project<'reference, Weight>{
// Required method
fn project(weight: &'reference Weight) -> Option<Self>;
}
Expand description
Enables projecting a graph element weight to a specific type.
This trait provides a mechanism to safely convert a generic graph element (vertex or edge) to a specific, strongly-typed representation.
§Type Parameters
'reference
: The lifetime of the reference to the weightWeight
: The type of the element weight being projected
Required Methods§
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.