pub struct TransactionalTree<'a, V, E>(/* private fields */);Expand description
A transaction that will be applied atomically to the Tree.
Implementations§
Source§impl<'a, V, E> StructuredTransactionalTree<'a, V, E>where
E: Encoding<V>,
impl<'a, V, E> StructuredTransactionalTree<'a, V, E>where
E: Encoding<V>,
Sourcepub fn insert<K>(
&self,
key: K,
value: V,
) -> ConflictableTransactionResult<Result<Option<V>>>
pub fn insert<K>( &self, key: K, value: V, ) -> ConflictableTransactionResult<Result<Option<V>>>
Set a key to a new value
Sourcepub fn remove<K>(
&self,
key: K,
) -> ConflictableTransactionResult<Result<Option<V>>>
pub fn remove<K>( &self, key: K, ) -> ConflictableTransactionResult<Result<Option<V>>>
Remove a key
Sourcepub fn get<K>(&self, key: K) -> ConflictableTransactionResult<Result<Option<V>>>
pub fn get<K>(&self, key: K) -> ConflictableTransactionResult<Result<Option<V>>>
Get the value associated with a key
Sourcepub fn apply_batch(
&self,
batch: StructuredBatch<V, E>,
) -> ConflictableTransactionResult<()>
pub fn apply_batch( &self, batch: StructuredBatch<V, E>, ) -> ConflictableTransactionResult<()>
Atomically apply multiple inserts and removals.
Trait Implementations§
Source§impl<'a, V: Clone, E: Clone> Clone for StructuredTransactionalTree<'a, V, E>
impl<'a, V: Clone, E: Clone> Clone for StructuredTransactionalTree<'a, V, E>
Source§fn clone(&self) -> StructuredTransactionalTree<'a, V, E>
fn clone(&self) -> StructuredTransactionalTree<'a, V, E>
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl<'a, V, E> Freeze for StructuredTransactionalTree<'a, V, E>
impl<'a, V, E> !RefUnwindSafe for StructuredTransactionalTree<'a, V, E>
impl<'a, V, E> !Send for StructuredTransactionalTree<'a, V, E>
impl<'a, V, E> !Sync for StructuredTransactionalTree<'a, V, E>
impl<'a, V, E> Unpin for StructuredTransactionalTree<'a, V, E>
impl<'a, V, E> !UnwindSafe for StructuredTransactionalTree<'a, V, E>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more