[][src]Struct sled::TransactionalTree

pub struct TransactionalTree<'a> { /* fields omitted */ }

A transaction that will be applied atomically to the Tree.

Methods

impl<'a> TransactionalTree<'a>[src]

pub fn insert<K, V>(&self, key: K, value: V) -> TransactionResult<Option<IVec>> where
    IVec: From<K>,
    IVec: From<V>,
    K: AsRef<[u8]>, 
[src]

Set a key to a new value

pub fn remove<K>(&self, key: K) -> TransactionResult<Option<IVec>> where
    IVec: From<K>,
    K: AsRef<[u8]>, 
[src]

Remove a key

pub fn get<K: AsRef<[u8]>>(&self, key: K) -> TransactionResult<Option<IVec>>[src]

Get the value associated with a key

pub fn apply_batch(&self, batch: Batch) -> TransactionResult<()>[src]

Atomically apply multiple inserts and removals.

Auto Trait Implementations

impl<'a> !Sync for TransactionalTree<'a>

impl<'a> !Send for TransactionalTree<'a>

impl<'a> Unpin for TransactionalTree<'a>

impl<'a> !UnwindSafe for TransactionalTree<'a>

impl<'a> !RefUnwindSafe for TransactionalTree<'a>

Blanket Implementations

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

impl<T, U> Into<U> for T where
    U: From<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]