pub struct MemoryDB { /* private fields */ }
Expand description
A database using HashMap
.
Trait Implementations§
source§impl Database for MemoryDB
impl Database for MemoryDB
fn new(_dbname: &str) -> Self
fn get(&mut self, key: &[u8]) -> Result<Option<Vec<u8>>>
fn put(&mut self, key: &[u8], value: Vec<u8>) -> Result<()>
fn delete(&mut self, key: &[u8]) -> Result<()>
fn init_batch(&mut self) -> Result<()>
fn finish_batch(&mut self) -> Result<()>
Auto Trait Implementations§
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