[−][src]Struct kvdb_memorydb::InMemory
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 Default 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]
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize[src]
pub fn constant_size() -> Option<usize>[src]
Auto Trait Implementations
impl !RefUnwindSafe for InMemory[src]
impl Send for InMemory[src]
impl Sync for InMemory[src]
impl Unpin for InMemory[src]
impl UnwindSafe for InMemory[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> MallocSizeOfExt for T where
T: MallocSizeOf, [src]
T: MallocSizeOf,
pub fn malloc_size_of(&self) -> usize[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,