Struct ethcore_db::InMemoryWithMetrics
source · [−]pub struct InMemoryWithMetrics { /* private fields */ }
Expand description
InMemory with disabled statistics
Implementations
Trait Implementations
sourceimpl KeyValueDB for InMemoryWithMetrics
impl KeyValueDB for InMemoryWithMetrics
sourcefn get_by_prefix(&self, col: Option<u32>, prefix: &[u8]) -> Option<Box<[u8]>>
fn get_by_prefix(&self, col: Option<u32>, prefix: &[u8]) -> Option<Box<[u8]>>
Get a value by partial key. Only works for flushed data.
sourcefn write_buffered(&self, transaction: DBTransaction)
fn write_buffered(&self, transaction: DBTransaction)
Write a transaction of changes to the buffer.
sourcefn write(&self, transaction: DBTransaction) -> Result<()>
fn write(&self, transaction: DBTransaction) -> Result<()>
Write a transaction of changes to the backing store.
sourcefn iter<'a>(
&'a self,
col: Option<u32>
) -> Box<dyn Iterator<Item = (Box<[u8]>, Box<[u8]>)> + 'a>
fn iter<'a>(
&'a self,
col: Option<u32>
) -> Box<dyn Iterator<Item = (Box<[u8]>, Box<[u8]>)> + 'a>
Iterate over flushed data for a given column.
sourcefn iter_from_prefix<'a>(
&'a self,
col: Option<u32>,
prefix: &'a [u8]
) -> Box<dyn Iterator<Item = (Box<[u8]>, Box<[u8]>)> + 'a>
fn iter_from_prefix<'a>(
&'a self,
col: Option<u32>,
prefix: &'a [u8]
) -> Box<dyn Iterator<Item = (Box<[u8]>, Box<[u8]>)> + 'a>
Iterate over flushed data for a given column, starting from a given prefix.
sourcefn restore(&self, new_db: &str) -> Result<()>
fn restore(&self, new_db: &str) -> Result<()>
Attempt to replace this database with a new one located at the given path.
sourcefn transaction(&self) -> DBTransaction
fn transaction(&self) -> DBTransaction
Helper to create a new transaction.
sourceimpl PrometheusMetrics for InMemoryWithMetrics
impl PrometheusMetrics for InMemoryWithMetrics
fn prometheus_metrics(&self, _: &mut PrometheusRegistry)
impl KeyValueDB for InMemoryWithMetrics
Auto Trait Implementations
impl !RefUnwindSafe for InMemoryWithMetrics
impl Send for InMemoryWithMetrics
impl Sync for InMemoryWithMetrics
impl Unpin for InMemoryWithMetrics
impl UnwindSafe for InMemoryWithMetrics
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more