Struct lmdb_zero::ConstAccessor
[−]
[src]
pub struct ConstAccessor<'txn>(_);
A read-only data accessor obtained from a ConstTransaction.
There is no corresponding ReadAccessor, since there are no additional
operations one can do with a known-read-only accessor.
Methods
impl<'txn> ConstAccessor<'txn>[src]
fn get<K: AsLmdbBytes + ?Sized, V: FromLmdbBytes + ?Sized>(&self, db: &Database, key: &K) -> Result<&V>
Get items from a database.
This function retrieves key/data pairs from the database. A reference
to the data associated with the given key is returned. If the database
supports duplicate keys (DUPSORT) then the first data item for the
key will be returned. Retrieval of other items requires the use of
cursoring.
The returned memory is valid until the next mutation through the transaction or the end of the transaction (both are enforced through the borrow checker).