Trait rs_graph::vec::Indexer [−][src]
pub trait Indexer: Clone { type Idx; type Iter: GraphIterator<Self, Item = Self::Idx>; fn num_items(&self) -> usize; fn index(&self, i: Self::Idx) -> usize; fn iter(&self) -> GraphIter<'_, Self, Self::Iter>ⓘ
where
Self: Sized; }
A indexer maps items to numeric indices.
Associated Types
Loading content...Required methods
fn num_items(&self) -> usize[src]
Return the number of items.
This is the maximal allowed index.
fn index(&self, i: Self::Idx) -> usize[src]
Return the index associated with an item.
fn iter(&self) -> GraphIter<'_, Self, Self::Iter>ⓘ where
Self: Sized, [src]
Self: Sized,
Return an iterator over all items.
Implementors
impl<'a, G> Indexer for EdgeIndexer<'a, G> where
G: IndexGraphRef<'a> + Clone, [src]
impl<'a, G> Indexer for EdgeIndexer<'a, G> where
G: IndexGraphRef<'a> + Clone, [src]