[][src]Struct rs_graph::vec::ItemVec

pub struct ItemVec<I, T> { /* fields omitted */ }

A vector that can be indexed by nodes or edges.

In fact, the vector can be indexed by some arbitrary item that can be mapped to a numeric index using an Indexer.

Methods

impl<I, T> ItemVec<I, T> where
    I: Indexer
[src]

pub fn from_indexer(indexer: I, value: T) -> Self where
    T: Clone
[src]

pub fn from_indexer_with<F>(indexer: I, f: F) -> Self where
    F: Fn(I::Idx) -> T, 
[src]

pub fn from_indexer_and_vec(indexer: I, values: Vec<T>) -> Self[src]

pub fn new2<G>(g: G, value: T) -> Self where
    I: GraphIndexer<G>,
    T: Clone
[src]

pub fn new<G>(g: G, value: T) -> Self where
    I: GraphIndexer<G>,
    T: Clone
[src]

pub fn new_with<G, F>(g: G, f: F) -> Self where
    I: GraphIndexer<G>,
    F: Fn(I::Idx) -> T, 
[src]

pub fn new_from_vec<G>(g: G, values: Vec<T>) -> Self where
    I: GraphIndexer<G>, 
[src]

pub fn iter(&self) -> Zip<I::Iter, Iter<T>>[src]

pub fn iter_mut(&mut self) -> Zip<I::Iter, IterMut<T>>[src]

pub fn map<F>(&self, f: F) -> Self where
    I: Clone,
    F: Fn((I::Idx, &T)) -> T, 
[src]

pub fn reset(&mut self, value: T) where
    T: Clone
[src]

Trait Implementations

impl<I, T> Index<<I as Indexer>::Idx> for ItemVec<I, T> where
    I: Indexer
[src]

type Output = T

The returned type after indexing.

impl<I, T> IndexMut<<I as Indexer>::Idx> for ItemVec<I, T> where
    I: Indexer
[src]

Auto Trait Implementations

impl<I, T> RefUnwindSafe for ItemVec<I, T> where
    I: RefUnwindSafe,
    T: RefUnwindSafe

impl<I, T> Send for ItemVec<I, T> where
    I: Send,
    T: Send

impl<I, T> Sync for ItemVec<I, T> where
    I: Sync,
    T: Sync

impl<I, T> Unpin for ItemVec<I, T> where
    I: Unpin,
    T: Unpin

impl<I, T> UnwindSafe for ItemVec<I, T> where
    I: UnwindSafe,
    T: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.