[−][src]Struct rs_graph::vec::ItemVec
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]
I: Indexer,
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 new2<G>(g: G, value: T) -> Self where
I: GraphIndexer<G>,
T: Clone,
[src]
I: GraphIndexer<G>,
T: Clone,
pub fn new<G>(g: G, value: T) -> Self where
I: GraphIndexer<G>,
T: Clone,
[src]
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<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]
I: Clone,
F: Fn((I::Idx, &T)) -> T,
pub fn reset(&mut self, value: T) where
T: Clone,
[src]
T: Clone,
Trait Implementations
impl<I, T> Index<<I as Indexer>::Idx> for ItemVec<I, T> where
I: Indexer,
[src]
I: Indexer,
impl<I, T> IndexMut<<I as Indexer>::Idx> for ItemVec<I, T> where
I: Indexer,
[src]
I: Indexer,
Auto Trait Implementations
impl<I, T> RefUnwindSafe for ItemVec<I, T> where
I: RefUnwindSafe,
T: RefUnwindSafe,
I: RefUnwindSafe,
T: RefUnwindSafe,
impl<I, T> Send for ItemVec<I, T> where
I: Send,
T: Send,
I: Send,
T: Send,
impl<I, T> Sync for ItemVec<I, T> where
I: Sync,
T: Sync,
I: Sync,
T: Sync,
impl<I, T> Unpin for ItemVec<I, T> where
I: Unpin,
T: Unpin,
I: Unpin,
T: Unpin,
impl<I, T> UnwindSafe for ItemVec<I, T> where
I: UnwindSafe,
T: UnwindSafe,
I: UnwindSafe,
T: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,