pub struct Txn<'env> { /* private fields */ }
Expand description
An immutable transaction.
Trait Implementations
sourceimpl<'env> Transaction for Txn<'env>
impl<'env> Transaction for Txn<'env>
sourcefn iter<'a, K: Representable, V: Representable>(
&'a self,
db: &'a Db<K, V>,
key: Option<(K, Option<V>)>
) -> Cursor<'a, Self, K, V>ⓘNotable traits for Cursor<'a, T, K, V>impl<'a, T: Transaction + 'a, K: Representable, V: Representable> Iterator for Cursor<'a, T, K, V> type Item = (K, V);
fn iter<'a, K: Representable, V: Representable>(
&'a self,
db: &'a Db<K, V>,
key: Option<(K, Option<V>)>
) -> Cursor<'a, Self, K, V>ⓘNotable traits for Cursor<'a, T, K, V>impl<'a, T: Transaction + 'a, K: Representable, V: Representable> Iterator for Cursor<'a, T, K, V> type Item = (K, V);
Iterate over a database, starting at the first value larger
than or equal to
(key, value)
(and at the smallest key, or
smallest value if one or both of them is None
). Read moresourcefn rev_iter<'a, K: Representable, V: Representable>(
&'a self,
db: &'a Db<K, V>,
key: Option<(K, Option<V>)>
) -> RevCursor<'a, Self, K, V>ⓘNotable traits for RevCursor<'a, T, K, V>impl<'a, T: Transaction + 'a, K: Representable, V: Representable> Iterator for RevCursor<'a, T, K, V> type Item = (K, V);
fn rev_iter<'a, K: Representable, V: Representable>(
&'a self,
db: &'a Db<K, V>,
key: Option<(K, Option<V>)>
) -> RevCursor<'a, Self, K, V>ⓘNotable traits for RevCursor<'a, T, K, V>impl<'a, T: Transaction + 'a, K: Representable, V: Representable> Iterator for RevCursor<'a, T, K, V> type Item = (K, V);
Iterate over a database in the reverse order, starting from the last binding strictly before
k
(or from the last binding in the table if k.is_none()
).sourcefn root<K: Representable, V: Representable>(
&mut self,
root: usize
) -> Option<Db<K, V>>
fn root<K: Representable, V: Representable>(
&mut self,
root: usize
) -> Option<Db<K, V>>
Gets the specified root. At most 508 different roots are allowed.
sourcefn get<'a, K: Representable, V: Representable>(
&'a self,
root: &Db<K, V>,
key: K,
value: Option<V>
) -> Option<V>
fn get<'a, K: Representable, V: Representable>(
&'a self,
root: &Db<K, V>,
key: K,
value: Option<V>
) -> Option<V>
Get the smallest value associated to
key
, or returns the
given binding if value
is Some(..)
and is associated to
key
in the given database. Read moreAuto Trait Implementations
impl<'env> RefUnwindSafe for Txn<'env>
impl<'env> !Send for Txn<'env>
impl<'env> Sync for Txn<'env>
impl<'env> Unpin for Txn<'env>
impl<'env> UnwindSafe for Txn<'env>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more