Struct shortcut::idx::HashIndex
[−]
[src]
pub struct HashIndex<K: Eq + Hash> { /* fields omitted */ }
An implementation of EqualityIndex
that uses a HashMap
.
Methods
impl<K: Eq + Hash> HashIndex<K>
[src]
Trait Implementations
impl<K: Clone + Eq + Hash> Clone for HashIndex<K>
[src]
fn clone(&self) -> HashIndex<K>
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl<T: Eq + Hash> EqualityIndex<T> for HashIndex<T>
[src]
fn lookup<'a>(&'a self, key: &T) -> Box<Iterator<Item = usize> + 'a>
Return an iterator that yields the indices of all rows that match the given value.
fn index(&mut self, key: T, row: usize)
Add the given row index to the index under the given value.
fn undex(&mut self, key: &T, row: usize)
Remove the given row index under the given value from the index.
fn estimate(&self) -> usize
Give the expected number of rows returned for a key. This method may be called often, and in rapid succession, and so should return quickly. Read more