Struct shortcut::idx::BTreeIndex
[−]
[src]
pub struct BTreeIndex<K: Ord + Eq> { // some fields omitted }
An implementation of RangeIndex
using a BTreeMap
.
Methods
impl<K: Ord + Eq> BTreeIndex<K>
[src]
fn new() -> BTreeIndex<K>
Allocate a new BTreeIndex
.
Trait Implementations
impl<T: Ord + Eq> EqualityIndex<T> for BTreeIndex<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