pub struct MemoryDB { /* private fields */ }Implementations§
Trait Implementations§
Source§impl DB for MemoryDB
impl DB for MemoryDB
type Error = MemDBError
fn get(&self, key: &[u8]) -> Result<Option<Vec<u8>>, <MemoryDB as DB>::Error>
Source§fn insert(
&self,
key: Vec<u8>,
value: Vec<u8>,
) -> Result<(), <MemoryDB as DB>::Error>
fn insert( &self, key: Vec<u8>, value: Vec<u8>, ) -> Result<(), <MemoryDB as DB>::Error>
Insert data into the cache.
fn contains(&self, key: &[u8]) -> Result<bool, <MemoryDB as DB>::Error>
Source§fn remove(&self, key: &[u8]) -> Result<(), <MemoryDB as DB>::Error>
fn remove(&self, key: &[u8]) -> Result<(), <MemoryDB as DB>::Error>
Insert data into the cache.
Auto Trait Implementations§
impl Freeze for MemoryDB
impl !RefUnwindSafe for MemoryDB
impl Send for MemoryDB
impl Sync for MemoryDB
impl Unpin for MemoryDB
impl !UnwindSafe for MemoryDB
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