Trait shortcut::idx::EqualityIndex
source · pub trait EqualityIndex<T> {
fn lookup<'a>(&'a self, _: &T) -> Box<dyn Iterator<Item = usize> + 'a>;
fn index(&mut self, _: T, _: usize);
fn undex(&mut self, _: &T, _: usize);
fn estimate(&self) -> usize;
}
Expand description
An EqualityIndex
is an index that can perform efficient equality lookups.
Required Methods§
sourcefn lookup<'a>(&'a self, _: &T) -> Box<dyn Iterator<Item = usize> + 'a>
fn lookup<'a>(&'a self, _: &T) -> Box<dyn Iterator<Item = usize> + 'a>
Return an iterator that yields the indices of all rows that match the given value.
sourcefn index(&mut self, _: T, _: usize)
fn index(&mut self, _: T, _: usize)
Add the given row index to the index under the given value.