Trait EdgeMap

Source
pub trait EdgeMap<T>: EIndexedGraph {
    type Emap;

    // Required methods
    fn construct_emap<F>(&self, f: F) -> Self::Emap
       where F: FnMut() -> T;
    fn emap_get<'a>(&self, map: &'a Self::Emap, eid: Self::EIndex) -> &'a T;
    fn emap_get_mut<'a>(
        &self,
        map: &'a mut Self::Emap,
        eid: Self::EIndex,
    ) -> &'a mut T;

    // Provided method
    fn emap_set(&self, map: &mut Self::Emap, eid: Self::EIndex, x: T) { ... }
}

Required Associated Types§

Required Methods§

Source

fn construct_emap<F>(&self, f: F) -> Self::Emap
where F: FnMut() -> T,

Source

fn emap_get<'a>(&self, map: &'a Self::Emap, eid: Self::EIndex) -> &'a T

Source

fn emap_get_mut<'a>( &self, map: &'a mut Self::Emap, eid: Self::EIndex, ) -> &'a mut T

Provided Methods§

Source

fn emap_set(&self, map: &mut Self::Emap, eid: Self::EIndex, x: T)

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§

Source§

impl<D, T> EdgeMap<T> for SparseGraph<D>

Source§

type Emap = Vec<T>