Struct rs_graph::vec::ItemVec [−][src]
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
.
Implementations
impl<I, T> ItemVec<I, T> where
I: Indexer,
[src]
impl<I, T> ItemVec<I, T> where
I: Indexer,
[src]pub fn from_indexer(indexer: I, value: T) -> Self where
T: Clone,
[src]
T: Clone,
pub fn from_indexer_with<F>(indexer: I, f: F) -> Self where
F: Fn(I::Idx) -> T,
[src]
F: Fn(I::Idx) -> T,
pub fn from_indexer_and_vec(indexer: I, values: Vec<T>) -> Self
[src]
pub fn new<G>(g: G, value: T) -> Self where
G: Clone,
I: GraphIndexer<G>,
T: Clone,
[src]
G: Clone,
I: GraphIndexer<G>,
T: Clone,
pub fn new_with<G, F>(g: G, f: F) -> Self where
I: GraphIndexer<G>,
F: Fn(I::Idx) -> T,
[src]
I: GraphIndexer<G>,
F: Fn(I::Idx) -> T,
pub fn new_from_vec<G>(g: G, values: Vec<T>) -> Self where
I: GraphIndexer<G>,
[src]
I: GraphIndexer<G>,
pub fn iter(&self) -> Zip<IndexerIter<'_, I>, Iter<'_, T>>
[src]
pub fn iter_mut(&mut self) -> Zip<IndexerIter<'_, I>, IterMut<'_, T>>
[src]
pub fn map<F>(&self, f: F) -> Self where
I: Clone,
F: Fn((I::Idx, &T)) -> T,
[src]
I: Clone,
F: Fn((I::Idx, &T)) -> T,
pub fn reset(&mut self, value: T) where
T: Clone,
[src]
T: Clone,
Trait Implementations
Auto Trait Implementations
impl<I, T> RefUnwindSafe for ItemVec<I, T> where
I: RefUnwindSafe,
T: RefUnwindSafe,
impl<I, T> RefUnwindSafe for ItemVec<I, T> where
I: RefUnwindSafe,
T: RefUnwindSafe,
impl<I, T> UnwindSafe for ItemVec<I, T> where
I: UnwindSafe,
T: UnwindSafe,
impl<I, T> UnwindSafe for ItemVec<I, T> where
I: UnwindSafe,
T: UnwindSafe,