pub trait VertexMap<T>: GraphBase {
type Vmap;
// Required methods
fn construct_vmap<F>(&self, f: F) -> Self::Vmap
where F: FnMut() -> T;
fn vmap_get<'a>(&self, map: &'a Self::Vmap, vid: Self::VIndex) -> &'a T;
fn vmap_get_mut<'a>(
&self,
map: &'a mut Self::Vmap,
vid: Self::VIndex,
) -> &'a mut T;
// Provided method
fn vmap_set(&self, map: &mut Self::Vmap, vid: Self::VIndex, x: T) { ... }
}
Required Associated Types§
Required Methods§
fn construct_vmap<F>(&self, f: F) -> Self::Vmapwhere
F: FnMut() -> T,
fn vmap_get<'a>(&self, map: &'a Self::Vmap, vid: Self::VIndex) -> &'a T
fn vmap_get_mut<'a>( &self, map: &'a mut Self::Vmap, vid: Self::VIndex, ) -> &'a mut T
Provided 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.