Struct ethcore_db::DatabaseWithMetrics
source · [−]pub struct DatabaseWithMetrics { /* private fields */ }
Expand description
Database with enabled statistics
Implementations
Trait Implementations
sourceimpl KeyValueDB for DatabaseWithMetrics
impl KeyValueDB for DatabaseWithMetrics
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 DatabaseWithMetrics
impl PrometheusMetrics for DatabaseWithMetrics
fn prometheus_metrics(&self, p: &mut PrometheusRegistry)
impl KeyValueDB for DatabaseWithMetrics
Auto Trait Implementations
impl !RefUnwindSafe for DatabaseWithMetrics
impl Send for DatabaseWithMetrics
impl Sync for DatabaseWithMetrics
impl Unpin for DatabaseWithMetrics
impl UnwindSafe for DatabaseWithMetrics
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