Struct sp_database::MemDb [−][src]
This implements Database as an in-memory hash map. commit is not atomic.
Implementations
impl<H> MemDb<H> where
    H: Clone + Send + Sync + Eq + PartialEq + Default + Hash, [src]
impl<H> MemDb<H> where
    H: Clone + Send + Sync + Eq + PartialEq + Default + Hash, [src]Trait Implementations
impl<H> Database<H> for MemDb<H> where
    H: Clone + Send + Sync + Eq + PartialEq + Default + Hash, [src]
impl<H> Database<H> for MemDb<H> where
    H: Clone + Send + Sync + Eq + PartialEq + Default + Hash, [src]fn commit(&self, transaction: Transaction<H>) -> Result<()>[src]
fn get(&self, col: ColumnId, key: &[u8]) -> Option<Vec<u8>>[src]
fn lookup(&self, hash: &H) -> Option<Vec<u8>>[src]
fn commit_ref<'a>(
    &self, 
    transaction: &mut dyn Iterator<Item = ChangeRef<'a, H>>
) -> Result<()>[src]
&self,
transaction: &mut dyn Iterator<Item = ChangeRef<'a, H>>
) -> Result<()>
fn contains(&self, col: ColumnId, key: &[u8]) -> bool[src]
fn with_get(&self, col: ColumnId, key: &[u8], f: &mut dyn FnMut(&[u8]))[src]
fn set(&self, col: ColumnId, key: &[u8], value: &[u8]) -> Result<()>[src]
fn remove(&self, col: ColumnId, key: &[u8]) -> Result<()>[src]
fn with_lookup(&self, hash: &H, f: &mut dyn FnMut(&[u8]))[src]
fn store(&self, hash: &H, preimage: &[u8]) -> Result<()>[src]
fn release(&self, hash: &H) -> Result<()>[src]
Auto Trait Implementations
impl<H> !RefUnwindSafe for MemDb<H>
impl<H> Send for MemDb<H>
impl<H> Sync for MemDb<H>
impl<H> Unpin for MemDb<H> where
    H: Unpin, 
H: Unpin,
impl<H> UnwindSafe for MemDb<H> where
    H: UnwindSafe, 
H: UnwindSafe,