pub trait ReadableDatabase {
// Required methods
fn begin_read(&self) -> Result<ReadTransaction, TransactionError>;
fn cache_stats(&self) -> CacheStats;
}Required Methods§
Sourcefn begin_read(&self) -> Result<ReadTransaction, TransactionError>
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
Sourcefn cache_stats(&self) -> CacheStats
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