[][src]Trait rdms::Reader

pub trait Reader<K, V> where
    K: Clone + Ord,
    V: Clone + Diff
{ fn get<Q: ?Sized>(&self, key: &Q) -> Result<Entry<K, V>>
    where
        K: Borrow<Q>,
        Q: Ord
;
fn iter(&self) -> Result<IndexIter<K, V>>;
fn range<'a, R, Q: ?Sized>(&'a self, range: R) -> Result<IndexIter<K, V>>
    where
        K: Borrow<Q>,
        R: 'a + RangeBounds<Q>,
        Q: 'a + Ord
;
fn reverse<'a, R, Q: ?Sized>(&'a self, range: R) -> Result<IndexIter<K, V>>
    where
        K: Borrow<Q>,
        R: 'a + RangeBounds<Q>,
        Q: 'a + Ord
;
fn get_with_versions<Q: ?Sized>(&self, key: &Q) -> Result<Entry<K, V>>
    where
        K: Borrow<Q>,
        Q: Ord
;
fn iter_with_versions(&self) -> Result<IndexIter<K, V>>;
fn range_with_versions<'a, R, Q: ?Sized>(
        &'a self,
        r: R
    ) -> Result<IndexIter<K, V>>
    where
        K: Borrow<Q>,
        R: 'a + RangeBounds<Q>,
        Q: 'a + Ord
;
fn reverse_with_versions<'a, R, Q: ?Sized>(
        &'a self,
        r: R
    ) -> Result<IndexIter<K, V>>
    where
        K: Borrow<Q>,
        R: 'a + RangeBounds<Q>,
        Q: 'a + Ord
; }

Index read operations.

Required methods

fn get<Q: ?Sized>(&self, key: &Q) -> Result<Entry<K, V>> where
    K: Borrow<Q>,
    Q: Ord

Get key from index. Returned entry may not have all its previous versions, if it is costly to fetch from disk.

fn iter(&self) -> Result<IndexIter<K, V>>

Iterate over all entries in this index. Returned entry may not have all its previous versions, if it is costly to fetch from disk.

fn range<'a, R, Q: ?Sized>(&'a self, range: R) -> Result<IndexIter<K, V>> where
    K: Borrow<Q>,
    R: 'a + RangeBounds<Q>,
    Q: 'a + Ord

Iterate from lower bound to upper bound. Returned entry may not have all its previous versions, if it is costly to fetch from disk.

fn reverse<'a, R, Q: ?Sized>(&'a self, range: R) -> Result<IndexIter<K, V>> where
    K: Borrow<Q>,
    R: 'a + RangeBounds<Q>,
    Q: 'a + Ord

Iterate from upper bound to lower bound. Returned entry may not have all its previous versions, if it is costly to fetch from disk.

fn get_with_versions<Q: ?Sized>(&self, key: &Q) -> Result<Entry<K, V>> where
    K: Borrow<Q>,
    Q: Ord

Get key from index. Returned entry shall have all its previous versions, can be a costly call.

fn iter_with_versions(&self) -> Result<IndexIter<K, V>>

Iterate over all entries in this index. Returned entry shall have all its previous versions, can be a costly call.

fn range_with_versions<'a, R, Q: ?Sized>(
    &'a self,
    r: R
) -> Result<IndexIter<K, V>> where
    K: Borrow<Q>,
    R: 'a + RangeBounds<Q>,
    Q: 'a + Ord

Iterate from lower bound to upper bound. Returned entry shall have all its previous versions, can be a costly call.

fn reverse_with_versions<'a, R, Q: ?Sized>(
    &'a self,
    r: R
) -> Result<IndexIter<K, V>> where
    K: Borrow<Q>,
    R: 'a + RangeBounds<Q>,
    Q: 'a + Ord

Iterate from upper bound to lower bound. Returned entry shall have all its previous versions, can be a costly call.

Loading content...

Implementors

impl<K, V> Reader<K, V> for Llrb<K, V> where
    K: Clone + Ord,
    V: Clone + Diff
[src]

Read operations on Llrb index.

fn get<Q: ?Sized>(&self, key: &Q) -> Result<Entry<K, V>> where
    K: Borrow<Q>,
    Q: Ord
[src]

Get the entry for key.

fn iter(&self) -> Result<IndexIter<K, V>>[src]

Return an iterator over all entries in this index.

fn range<'a, R, Q: ?Sized>(&'a self, range: R) -> Result<IndexIter<K, V>> where
    K: Borrow<Q>,
    R: 'a + RangeBounds<Q>,
    Q: 'a + Ord
[src]

Range over all entries from low to high.

fn reverse<'a, R, Q: ?Sized>(&'a self, range: R) -> Result<IndexIter<K, V>> where
    K: Borrow<Q>,
    R: 'a + RangeBounds<Q>,
    Q: 'a + Ord
[src]

Reverse range over all entries from high to low.

fn get_with_versions<Q: ?Sized>(&self, key: &Q) -> Result<Entry<K, V>> where
    K: Borrow<Q>,
    Q: Ord
[src]

Short circuited to get().

fn iter_with_versions(&self) -> Result<IndexIter<K, V>>[src]

Short circuited to iter().

fn range_with_versions<'a, R, Q: ?Sized>(
    &'a self,
    rng: R
) -> Result<IndexIter<K, V>> where
    K: Borrow<Q>,
    R: 'a + RangeBounds<Q>,
    Q: 'a + Ord
[src]

Short circuited to range().

fn reverse_with_versions<'a, R, Q: ?Sized>(
    &'a self,
    r: R
) -> Result<IndexIter<K, V>> where
    K: Borrow<Q>,
    R: 'a + RangeBounds<Q>,
    Q: 'a + Ord
[src]

Short circuited to reverse()

impl<K, V> Reader<K, V> for LlrbReader<K, V> where
    K: Clone + Ord,
    V: Clone + Diff
[src]

fn get<Q: ?Sized>(&self, key: &Q) -> Result<Entry<K, V>> where
    K: Borrow<Q>,
    Q: Ord
[src]

Get key from index.

fn iter(&self) -> Result<IndexIter<K, V>>[src]

Iterate over all entries in this index.

fn range<'a, R, Q: ?Sized>(&'a self, range: R) -> Result<IndexIter<K, V>> where
    K: Borrow<Q>,
    R: 'a + RangeBounds<Q>,
    Q: 'a + Ord
[src]

Iterate from lower bound to upper bound.

fn reverse<'a, R, Q: ?Sized>(&'a self, range: R) -> Result<IndexIter<K, V>> where
    K: Borrow<Q>,
    R: 'a + RangeBounds<Q>,
    Q: 'a + Ord
[src]

Iterate from upper bound to lower bound.

fn get_with_versions<Q: ?Sized>(&self, key: &Q) -> Result<Entry<K, V>> where
    K: Borrow<Q>,
    Q: Ord
[src]

Short circuited to get().

fn iter_with_versions(&self) -> Result<IndexIter<K, V>>[src]

Short circuited to iter().

fn range_with_versions<'a, R, Q: ?Sized>(
    &'a self,
    r: R
) -> Result<IndexIter<K, V>> where
    K: Borrow<Q>,
    R: 'a + RangeBounds<Q>,
    Q: 'a + Ord
[src]

Short circuited to range().

fn reverse_with_versions<'a, R, Q: ?Sized>(
    &'a self,
    r: R
) -> Result<IndexIter<K, V>> where
    K: Borrow<Q>,
    R: 'a + RangeBounds<Q>,
    Q: 'a + Ord
[src]

Short circuited to reverse()

impl<K, V> Reader<K, V> for Mvcc<K, V> where
    K: Clone + Ord,
    V: Clone + Diff
[src]

Read operations on Mvcc instance.

fn get<Q: ?Sized>(&self, key: &Q) -> Result<Entry<K, V>> where
    K: Borrow<Q>,
    Q: Ord
[src]

Get the latest version for key.

fn get_with_versions<Q: ?Sized>(&self, key: &Q) -> Result<Entry<K, V>> where
    K: Borrow<Q>,
    Q: Ord
[src]

Short circuited to get().

fn iter_with_versions(&self) -> Result<IndexIter<K, V>>[src]

Short circuited to iter().

fn range_with_versions<'a, R, Q: ?Sized>(
    &'a self,
    range: R
) -> Result<IndexIter<K, V>> where
    K: Borrow<Q>,
    R: 'a + RangeBounds<Q>,
    Q: 'a + Ord
[src]

Short circuited to range().

fn reverse_with_versions<'a, R, Q: ?Sized>(
    &'a self,
    range: R
) -> Result<IndexIter<K, V>> where
    K: Borrow<Q>,
    R: 'a + RangeBounds<Q>,
    Q: 'a + Ord
[src]

Short circuited to reverse()

impl<K, V> Reader<K, V> for MvccReader<K, V> where
    K: Clone + Ord,
    V: Clone + Diff
[src]

fn get<Q: ?Sized>(&self, key: &Q) -> Result<Entry<K, V>> where
    K: Borrow<Q>,
    Q: Ord
[src]

Get key from index.

fn iter(&self) -> Result<IndexIter<K, V>>[src]

Iterate over all entries in this index.

fn range<'a, R, Q: ?Sized>(&'a self, range: R) -> Result<IndexIter<K, V>> where
    K: Borrow<Q>,
    R: 'a + RangeBounds<Q>,
    Q: 'a + Ord
[src]

Iterate from lower bound to upper bound.

fn reverse<'a, R, Q: ?Sized>(&'a self, range: R) -> Result<IndexIter<K, V>> where
    K: Borrow<Q>,
    R: 'a + RangeBounds<Q>,
    Q: 'a + Ord
[src]

Iterate from upper bound to lower bound.

fn get_with_versions<Q: ?Sized>(&self, key: &Q) -> Result<Entry<K, V>> where
    K: Borrow<Q>,
    Q: Ord
[src]

Short circuited to get().

fn iter_with_versions(&self) -> Result<IndexIter<K, V>>[src]

Short circuited to iter().

fn range_with_versions<'a, R, Q: ?Sized>(
    &'a self,
    r: R
) -> Result<IndexIter<K, V>> where
    K: Borrow<Q>,
    R: 'a + RangeBounds<Q>,
    Q: 'a + Ord
[src]

Short circuited to range().

fn reverse_with_versions<'a, R, Q: ?Sized>(
    &'a self,
    r: R
) -> Result<IndexIter<K, V>> where
    K: Borrow<Q>,
    R: 'a + RangeBounds<Q>,
    Q: 'a + Ord
[src]

Short circuited to reverse()

impl<K, V> Reader<K, V> for NoDisk<K, V> where
    K: Clone + Ord,
    V: Clone + Diff
[src]

impl<K, V> Reader<K, V> for Snapshot<K, V> where
    K: Clone + Ord + Serialize,
    V: Clone + Diff + Serialize,
    <V as Diff>::D: Clone + Serialize
[src]

fn iter_with_versions(&self) -> Result<IndexIter<K, V>>[src]

Iterate over all entries in this index. Returned entry shall have all its previous versions, can be a costly call.

fn range_with_versions<'a, R, Q: ?Sized>(
    &'a self,
    range: R
) -> Result<IndexIter<K, V>> where
    K: Borrow<Q>,
    R: 'a + RangeBounds<Q>,
    Q: 'a + Ord
[src]

Iterate from lower bound to upper bound. Returned entry shall have all its previous versions, can be a costly call.

fn reverse_with_versions<'a, R, Q: ?Sized>(
    &'a self,
    range: R
) -> Result<IndexIter<K, V>> where
    K: Borrow<Q>,
    R: 'a + RangeBounds<Q>,
    Q: 'a + Ord
[src]

Iterate from upper bound to lower bound. Returned entry shall have all its previous versions, can be a costly call.

Loading content...