Struct kvdb_memorydb::InMemory [−][src]
pub struct InMemory { /* fields omitted */ }A key-value database fulfilling the KeyValueDB trait, living in memory.
This is generally intended for tests and is not particularly optimized.
Trait Implementations
impl KeyValueDB for InMemory[src]
impl KeyValueDB for InMemory[src]fn get(&self, col: u32, key: &[u8]) -> Result<Option<DBValue>>[src]
fn get_by_prefix(&self, col: u32, prefix: &[u8]) -> Option<Box<[u8]>>[src]
fn write(&self, transaction: DBTransaction) -> Result<()>[src]
fn iter<'a>(
&'a self,
col: u32
) -> Box<dyn Iterator<Item = (Box<[u8]>, Box<[u8]>)> + 'a>[src]
&'a self,
col: u32
) -> Box<dyn Iterator<Item = (Box<[u8]>, Box<[u8]>)> + 'a>
fn iter_with_prefix<'a>(
&'a self,
col: u32,
prefix: &'a [u8]
) -> Box<dyn Iterator<Item = (Box<[u8]>, Box<[u8]>)> + 'a>[src]
&'a self,
col: u32,
prefix: &'a [u8]
) -> Box<dyn Iterator<Item = (Box<[u8]>, Box<[u8]>)> + 'a>
fn restore(&self, _new_db: &str) -> Result<()>[src]
pub fn transaction(&self) -> DBTransaction[src]
pub fn io_stats(&self, _kind: Kind) -> IoStats[src]
pub fn has_key(&self, col: u32, key: &[u8]) -> Result<bool, Error>[src]
pub fn has_prefix(&self, col: u32, prefix: &[u8]) -> bool[src]
impl MallocSizeOf for InMemory[src]
impl MallocSizeOf for InMemory[src]fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize[src]
pub fn constant_size() -> Option<usize>[src]
Auto Trait Implementations
impl !RefUnwindSafe for InMemory
impl Send for InMemory
impl Sync for InMemory
impl Unpin for InMemory
impl UnwindSafe for InMemory
Blanket Implementations
impl<T> MallocSizeOfExt for T where
T: MallocSizeOf, [src]
impl<T> MallocSizeOfExt for T where
T: MallocSizeOf, [src]