[][src]Struct rdms::Rdms

pub struct Rdms<K, V, M, D> where
    K: Clone + Ord + Footprint,
    V: Clone + Diff + Footprint,
    M: Index<K, V>,
    D: Index<K, V>, 
{ /* fields omitted */ }

Index keys and corresponding values. Check module documentation for the full set of features.

Methods

impl<K, V, M, D> Rdms<K, V, M, D> where
    K: Clone + Ord + Footprint,
    V: Clone + Diff + Footprint,
    M: Index<K, V>,
    D: Index<K, V>, 
[src]

pub fn new<S>(
    name: S,
    mem: M,
    disk: D,
    config: Config
) -> Result<Rdms<K, V, M, D>> where
    S: AsRef<str>, 
[src]

impl<K, V, M, D> Rdms<K, V, M, D> where
    K: Clone + Ord + Footprint,
    V: Clone + Diff + Footprint,
    M: Index<K, V>,
    D: Index<K, V>, 
[src]

pub fn to_name(&self) -> String[src]

pub fn to_seqno(&self) -> u64[src]

impl<K, V, M, D> Rdms<K, V, M, D> where
    K: 'static + Clone + Ord + Footprint,
    V: 'static + Clone + Diff + Footprint,
    M: Index<K, V> + Reader<K, V>,
    D: Index<K, V> + Reader<K, V>, 
[src]

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

Get key from index.

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

Iterate over all entries in this index.

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

Iterate from lower bound to upper bound.

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

Iterate from upper bound to lower bound.

impl<K, V, M, D> Rdms<K, V, M, D> where
    K: 'static + Clone + Ord + Footprint,
    V: 'static + Clone + Diff + From<<V as Diff>::D> + Footprint,
    M: Index<K, V> + Reader<K, V>,
    D: Index<K, V> + Reader<K, V>, 
[src]

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

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

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

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

impl<K, V, M, D> Rdms<K, V, M, D> where
    K: Clone + Ord + Footprint,
    V: Clone + Diff + Footprint,
    M: Index<K, V> + Writer<K, V>,
    D: Index<K, V>, 
[src]

pub fn set(&mut self, key: K, value: V) -> Result<Option<Entry<K, V>>>[src]

Set {key, value} in index. Return older entry if present.

pub fn set_cas(
    &mut self,
    key: K,
    value: V,
    cas: u64
) -> Result<Option<Entry<K, V>>>
[src]

Set {key, value} in index if an older entry exists with the same cas value. To create a fresh entry, pass cas as ZERO. Return the older entry if present.

pub fn delete<Q: ?Sized>(&mut self, key: &Q) -> Result<Option<Entry<K, V>>> where
    K: Borrow<Q>,
    Q: ToOwned<Owned = K> + Ord
[src]

Delete key from DB. Return the entry if it is already present.

impl<K, V, M, D> Rdms<K, V, M, D> where
    K: Clone + Ord + Debug + Footprint,
    V: Clone + Diff + Footprint,
    M: Index<K, V>,
    D: Index<K, V>, 
[src]

pub fn validate(&self) -> Result<()>[src]

Auto Trait Implementations

impl<K, V, M, D> Send for Rdms<K, V, M, D> where
    D: Send,
    K: Send,
    M: Send,
    V: Send

impl<K, V, M, D> Sync for Rdms<K, V, M, D> where
    D: Sync,
    K: Sync,
    M: Sync,
    V: Sync

impl<K, V, M, D> Unpin for Rdms<K, V, M, D> where
    D: Unpin,
    K: Unpin,
    M: Unpin,
    V: Unpin

impl<K, V, M, D> UnwindSafe for Rdms<K, V, M, D> where
    D: UnwindSafe,
    K: UnwindSafe,
    M: UnwindSafe,
    V: UnwindSafe

impl<K, V, M, D> RefUnwindSafe for Rdms<K, V, M, D> where
    D: RefUnwindSafe,
    K: RefUnwindSafe,
    M: RefUnwindSafe,
    V: RefUnwindSafe

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]