Struct shortcut::idx::HashIndex
[−]
[src]
pub struct HashIndex<K: Eq + Hash> { // some fields omitted }
An implementation of EqualityIndex
that uses a HashMap
.
Methods
impl<K: Eq + Hash> HashIndex<K>
[src]
Trait Implementations
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