Struct mkit::db::Entry[][src]

pub struct Entry<K, V, D = NoDiff> {
    pub key: K,
    pub value: Value<V>,
    pub deltas: Vec<Delta<D>>,
}

Entry type, describe a single {key,value} entry within indexed data-set.

Fields

key: Kvalue: Value<V>deltas: Vec<Delta<D>>

Implementations

impl<K, V, D> Entry<K, V, D>[src]

pub const ID: u32[src]

impl<K, V, D> Entry<K, V, D>[src]

pub fn new(key: K, value: V, seqno: u64) -> Entry<K, V, D>[src]

pub fn new_deleted(key: K, seqno: u64) -> Entry<K, V, D>[src]

pub fn insert(&mut self, value: V, seqn: u64) where
    V: Clone + Diff<Delta = D>, 
[src]

pub fn delete(&mut self, seqn: u64) where
    V: Clone + Diff<Delta = D>,
    <V as Diff>::Delta: From<V>, 
[src]

pub fn drain_deltas(&mut self)[src]

impl<K, V, D> Entry<K, V, D>[src]

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

pub fn to_key(&self) -> K where
    K: Clone
[src]

pub fn to_value(&self) -> Option<V> where
    V: Clone
[src]

pub fn as_key(&self) -> &K[src]

pub fn borrow_key<Q>(&self) -> &Q where
    K: Borrow<Q>, 
[src]

pub fn is_deleted(&self) -> bool[src]

pub fn to_values(&self) -> Vec<Value<V>> where
    V: Diff<Delta = D> + Clone,
    D: Clone
[src]

pub fn contains(&self, other: &Self) -> bool where
    V: Clone + PartialEq + Diff<Delta = D>,
    D: Clone
[src]

pub fn merge(&self, other: &Self) -> Self where
    K: PartialEq + Clone,
    V: Clone + Diff<Delta = D>,
    D: Clone + From<V>, 
[src]

pub fn purge(self, cutoff: Cutoff) -> Option<Self> where
    Self: Sized
[src]

Trait Implementations

impl<K: Clone, V: Clone, D: Clone> Clone for Entry<K, V, D>[src]

impl<K: Debug, V: Debug, D: Debug> Debug for Entry<K, V, D>[src]

impl<K: Eq, V: Eq, D: Eq> Eq for Entry<K, V, D>[src]

impl<K, V, D> From<(K, Vec<Value<V>, Global>)> for Entry<K, V, D> where
    V: Clone + Diff<Delta = D>,
    <V as Diff>::Delta: From<V>, 
[src]

impl<K, V, D> FromCbor for Entry<K, V, D> where
    K: FromCbor,
    V: FromCbor,
    D: FromCbor
[src]

impl<K, V, D> IntoCbor for Entry<K, V, D> where
    K: IntoCbor,
    V: IntoCbor,
    D: IntoCbor
[src]

impl<K: PartialEq, V: PartialEq, D: PartialEq> PartialEq<Entry<K, V, D>> for Entry<K, V, D>[src]

impl<K, V, D> StructuralEq for Entry<K, V, D>[src]

impl<K, V, D> StructuralPartialEq for Entry<K, V, D>[src]

Auto Trait Implementations

impl<K, V, D> RefUnwindSafe for Entry<K, V, D> where
    D: RefUnwindSafe,
    K: RefUnwindSafe,
    V: RefUnwindSafe

impl<K, V, D> Send for Entry<K, V, D> where
    D: Send,
    K: Send,
    V: Send

impl<K, V, D> Sync for Entry<K, V, D> where
    D: Sync,
    K: Sync,
    V: Sync

impl<K, V, D> Unpin for Entry<K, V, D> where
    D: Unpin,
    K: Unpin,
    V: Unpin

impl<K, V, D> UnwindSafe for Entry<K, V, D> where
    D: UnwindSafe,
    K: UnwindSafe,
    V: UnwindSafe

Blanket Implementations

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

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

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

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

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

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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.