[−][src]Struct rdms::llrb::LlrbWriter
Trait Implementations
impl<K, V> Writer<K, V> for LlrbWriter<K, V> where
K: Clone + Ord + Footprint,
V: Clone + Diff + Footprint,
[src]
K: Clone + Ord + Footprint,
V: Clone + Diff + Footprint,
fn set(&mut self, key: K, value: V) -> Result<Option<Entry<K, V>>>
[src]
Set {key, value} pair into index. If key is already present, update the value and return the previous entry, else create a new entry.
LSM mode: Add a new version for the key, perserving the old value.
fn set_cas(&mut self, key: K, value: V, cas: u64) -> Result<Option<Entry<K, V>>>
[src]
Similar to set, but succeeds only when CAS matches with entry's
last seqno
. In other words, since seqno is unique to each mutation,
we use seqno
of the mutation as the CAS value. Use CAS == 0 to
enforce a create operation.
LSM mode: Add a new version for the key, perserving the old value.
fn delete<Q: ?Sized>(&mut self, key: &Q) -> Result<Option<Entry<K, V>>> where
K: Borrow<Q>,
Q: ToOwned<Owned = K> + Ord,
[src]
K: Borrow<Q>,
Q: ToOwned<Owned = K> + Ord,
Delete the given key. Note that back-to-back delete for the same key shall collapse into a single delete, first delete is ingested while the rest are ignored.
LSM mode: Mark the entry as deleted along with seqno at which it deleted
NOTE: K should be borrowable as &Q and Q must be convertable to owned K. This is require in lsm mode, where owned K must be inserted into the tree.
impl<K, V> Drop for LlrbWriter<K, V> where
K: Clone + Ord,
V: Clone + Diff,
[src]
K: Clone + Ord,
V: Clone + Diff,
impl<K, V> AsMut<Llrb<K, V>> for LlrbWriter<K, V> where
K: Clone + Ord,
V: Clone + Diff,
[src]
K: Clone + Ord,
V: Clone + Diff,
Auto Trait Implementations
impl<K, V> Send for LlrbWriter<K, V> where
K: Send,
V: Send,
K: Send,
V: Send,
impl<K, V> Sync for LlrbWriter<K, V> where
K: Sync,
V: Sync,
K: Sync,
V: Sync,
impl<K, V> Unpin for LlrbWriter<K, V> where
K: Unpin,
V: Unpin,
K: Unpin,
V: Unpin,
impl<K, V> UnwindSafe for LlrbWriter<K, V> where
K: UnwindSafe,
V: UnwindSafe,
K: UnwindSafe,
V: UnwindSafe,
impl<K, V> RefUnwindSafe for LlrbWriter<K, V> where
K: RefUnwindSafe,
V: RefUnwindSafe,
K: RefUnwindSafe,
V: RefUnwindSafe,
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,