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

impl<T: Ord + Eq> RangeIndex<T> for BTreeIndex<T>
[src]

fn between<'a>(&'a self, min: Bound<&T>, max: Bound<&T>) -> Box<Iterator<Item=usize> + 'a>

Return an iterator that yields the indices of all rows whose value (in the column this index is assigned to) lies within the given Bounds. Read more