Trait shortcut::idx::EqualityIndex [] [src]

pub trait EqualityIndex<T> {
    fn lookup<'a>(&'a self, &T) -> Box<Iterator<Item=usize> + 'a>;
    fn index(&mut self, T, usize);
    fn undex(&mut self, T, usize);
    fn estimate(&self) -> usize;
}

An EqualityIndex is an index that can perform efficient equality lookups.

Required Methods

Return an iterator that yields the indices of all rows that match the given value.

Add the given row index to the index under the given value.

Remove the given row index under the given value from the index.

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.

Implementors