ReadableDatabase

Trait ReadableDatabase 

Source
pub trait ReadableDatabase {
    // Required methods
    fn begin_read(&self) -> Result<ReadTransaction, TransactionError>;
    fn cache_stats(&self) -> CacheStats;
}

Required Methods§

Source

fn begin_read(&self) -> Result<ReadTransaction, TransactionError>

Begins a read transaction

Captures a snapshot of the database, so that only data committed before calling this method is visible in the transaction

Returns a ReadTransaction which may be used to read from the database. Read transactions may exist concurrently with writes

Source

fn cache_stats(&self) -> CacheStats

Information regarding the usage of the in-memory cache

Note: these metrics are only collected when the “cache_metrics” feature is enabled

Implementors§