Struct rhaki_cw_multi_test::StorageTransaction
source · pub struct StorageTransaction<'a> { /* private fields */ }
Expand description
StorageTransaction is a wrapper around a Storage that allows cache before commit
Implementations§
Trait Implementations§
source§impl<'a> Storage for StorageTransaction<'a>
impl<'a> Storage for StorageTransaction<'a>
source§fn range<'b>(
&'b self,
start: Option<&[u8]>,
end: Option<&[u8]>,
order: Order
) -> Box<dyn Iterator<Item = Record> + 'b>
fn range<'b>( &'b self, start: Option<&[u8]>, end: Option<&[u8]>, order: Order ) -> Box<dyn Iterator<Item = Record> + 'b>
Range allows iteration over a set of keys, either forwards or backwards
uses standard Rust range notation, e.g. db.range(b"foo"‥b"bar")
,
works also in reverse order.
source§fn get(&self, key: &[u8]) -> Option<Vec<u8>>
fn get(&self, key: &[u8]) -> Option<Vec<u8>>
Returns None when key does not exist.
Returns Some(Vec) when key exists. Read more
fn set(&mut self, key: &[u8], value: &[u8])
Auto Trait Implementations§
impl<'a> Freeze for StorageTransaction<'a>
impl<'a> !RefUnwindSafe for StorageTransaction<'a>
impl<'a> !Send for StorageTransaction<'a>
impl<'a> !Sync for StorageTransaction<'a>
impl<'a> Unpin for StorageTransaction<'a>
impl<'a> !UnwindSafe for StorageTransaction<'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
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more