Struct exonum::storage::MemoryDB
[−]
[src]
pub struct MemoryDB { /* fields omitted */ }
Database implementation that stores all the data in memory.
It's mainly used for testing and not designed to be efficient.
Methods
impl MemoryDB
[src]
Trait Implementations
impl Default for MemoryDB
[src]
impl Clone for MemoryDB
[src]
fn clone(&self) -> MemoryDB
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Debug for MemoryDB
[src]
impl Database for MemoryDB
[src]
fn clone(&self) -> Box<Database>
[src]
Creates a new reference to the database as Box<Database>
.
fn snapshot(&self) -> Box<Snapshot>
[src]
Creates a new snapshot of the database from its current state. Read more
fn merge(&mut self, patch: Patch) -> Result<()>
[src]
Atomically applies a sequence of patch changes to the database. Read more
fn fork(&self) -> Fork
[src]
Creates a new fork of the database from its current state. Read more
impl Snapshot for MemoryDB
[src]
fn get(&self, name: &str, key: &[u8]) -> Option<Vec<u8>>
[src]
Returns a value as raw vector of bytes corresponding to the specified key or None
if does not exist. Read more
fn contains(&self, name: &str, key: &[u8]) -> bool
[src]
Returns true
if the snapshot contains a value for the specified key. Read more
fn iter(&self, name: &str, from: &[u8]) -> Iter
[src]
Returns an iterator over the entries of the snapshot in ascending order starting from the specified key. The iterator element type is (&[u8], &[u8])
. Read more