Struct sanakirja::Txn
[−]
[src]
pub struct Txn<'env> { pub txn: Txn<'env>, }
Immutable transaction
Fields
txn: Txn<'env>
Trait Implementations
impl<'env> Transaction for Txn<'env>
[src]
fn root(&self) -> Option<Db>
Load the root database, if there's one.
fn get<'a>(&'a self, db: &Db, key: &[u8], value: Option<&[u8]>) -> Option<Value<'a, Self>>
get the smallest value corresponding to a key (or to a key and a value). The return type is an iterator outputting byte slices.
fn open_db<'a>(&'a self, key: &[u8]) -> Option<Db>
Open an existing database from the root database.
fn iterate<'a, F: FnMut(&'a [u8], Value<'a, Self>) -> bool>(&'a self, db: &Db, key: &[u8], value: Option<&[u8]>, f: F)
Iterate a function, starting from the key
and value
arguments, until the function returns false
.