pub struct MemoryTransaction<'a> { /* private fields */ }Expand description
An in-memory transaction that enforces snapshot isolation.
Trait Implementations§
Source§impl<'a> Drop for MemoryTransaction<'a>
impl<'a> Drop for MemoryTransaction<'a>
Source§impl<'a> KVTransaction<'a> for MemoryTransaction<'a>
impl<'a> KVTransaction<'a> for MemoryTransaction<'a>
Source§fn put(&mut self, key: Key, value: Value) -> Result<()>
fn put(&mut self, key: Key, value: Value) -> Result<()>
Sets a value for a given key.
This operation is buffered and will be applied on commit. Read more
Source§fn delete(&mut self, key: Key) -> Result<()>
fn delete(&mut self, key: Key) -> Result<()>
Deletes a key-value pair.
This operation is buffered and will be applied on commit. Read more
Source§fn scan_prefix(
&mut self,
prefix: &[u8],
) -> Result<Box<dyn Iterator<Item = (Key, Value)> + '_>>
fn scan_prefix( &mut self, prefix: &[u8], ) -> Result<Box<dyn Iterator<Item = (Key, Value)> + '_>>
Scans all key-value pairs whose keys start with the given prefix. Read more
Source§fn scan_range(
&mut self,
start: &[u8],
end: &[u8],
) -> Result<Box<dyn Iterator<Item = (Key, Value)> + '_>>
fn scan_range( &mut self, start: &[u8], end: &[u8], ) -> Result<Box<dyn Iterator<Item = (Key, Value)> + '_>>
Scans key-value pairs in the half-open range [start, end). Read more
Source§impl<'a> TxnManager<'a, MemoryTransaction<'a>> for &'a MemoryTxnManager
impl<'a> TxnManager<'a, MemoryTransaction<'a>> for &'a MemoryTxnManager
Auto Trait Implementations§
impl<'a> Freeze for MemoryTransaction<'a>
impl<'a> RefUnwindSafe for MemoryTransaction<'a>
impl<'a> Send for MemoryTransaction<'a>
impl<'a> Sync for MemoryTransaction<'a>
impl<'a> Unpin for MemoryTransaction<'a>
impl<'a> UnwindSafe for MemoryTransaction<'a>
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