Trait libpijul_compat::Transaction
[−]
[src]
pub trait Transaction: SkipList {
fn iter<K, V>(
&'a self,
db: &'a Db<K, V>,
key: Option<(K, Option<V>)>
) -> Cursor<'a, Self, K, V>
where
K: Representable,
V: Representable,
{ ... }
fn rev_iter<K, V>(
&'a self,
db: &'a Db<K, V>,
key: Option<(K, Option<V>)>
) -> RevCursor<'a, Self, K, V>
where
K: Representable,
V: Representable,
{ ... }
fn root<K, V>(&mut self, root: usize) -> Option<Db<K, V>>
where
K: Representable,
V: Representable,
{ ... }
fn get<K, V>(
&'a self,
root: &Db<K, V>,
key: K,
value: Option<V>
) -> Option<V>
where
K: Representable,
V: Representable,
{ ... }
}Trait for operations common to mutable and immutable transactions.
Provided Methods
fn iter<K, V>(
&'a self,
db: &'a Db<K, V>,
key: Option<(K, Option<V>)>
) -> Cursor<'a, Self, K, V> where
K: Representable,
V: Representable,
&'a self,
db: &'a Db<K, V>,
key: Option<(K, Option<V>)>
) -> Cursor<'a, Self, K, V> where
K: Representable,
V: Representable,
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).
fn rev_iter<K, V>(
&'a self,
db: &'a Db<K, V>,
key: Option<(K, Option<V>)>
) -> RevCursor<'a, Self, K, V> where
K: Representable,
V: Representable,
&'a self,
db: &'a Db<K, V>,
key: Option<(K, Option<V>)>
) -> RevCursor<'a, Self, K, V> where
K: Representable,
V: Representable,
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()).
fn root<K, V>(&mut self, root: usize) -> Option<Db<K, V>> where
K: Representable,
V: Representable,
K: Representable,
V: Representable,
Gets the specified root. At most 508 different roots are allowed.
fn get<K, V>(&'a self, root: &Db<K, V>, key: K, value: Option<V>) -> Option<V> where
K: Representable,
V: Representable,
K: Representable,
V: Representable,
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.
Implementations on Foreign Types
impl<'env> Transaction for Txn<'env>[src]
fn iter<K, V>(
&'a self,
db: &'a Db<K, V>,
key: Option<(K, Option<V>)>
) -> Cursor<'a, Self, K, V> where
K: Representable,
V: Representable, [src]
&'a self,
db: &'a Db<K, V>,
key: Option<(K, Option<V>)>
) -> Cursor<'a, Self, K, V> where
K: Representable,
V: Representable,
fn rev_iter<K, V>(
&'a self,
db: &'a Db<K, V>,
key: Option<(K, Option<V>)>
) -> RevCursor<'a, Self, K, V> where
K: Representable,
V: Representable, [src]
&'a self,
db: &'a Db<K, V>,
key: Option<(K, Option<V>)>
) -> RevCursor<'a, Self, K, V> where
K: Representable,
V: Representable,
fn root<K, V>(&mut self, root: usize) -> Option<Db<K, V>> where
K: Representable,
V: Representable, [src]
K: Representable,
V: Representable,
fn get<K, V>(&'a self, root: &Db<K, V>, key: K, value: Option<V>) -> Option<V> where
K: Representable,
V: Representable, [src]
K: Representable,
V: Representable,
impl<'env, T> Transaction for MutTxn<'env, T>[src]
fn iter<K, V>(
&'a self,
db: &'a Db<K, V>,
key: Option<(K, Option<V>)>
) -> Cursor<'a, Self, K, V> where
K: Representable,
V: Representable, [src]
&'a self,
db: &'a Db<K, V>,
key: Option<(K, Option<V>)>
) -> Cursor<'a, Self, K, V> where
K: Representable,
V: Representable,
fn rev_iter<K, V>(
&'a self,
db: &'a Db<K, V>,
key: Option<(K, Option<V>)>
) -> RevCursor<'a, Self, K, V> where
K: Representable,
V: Representable, [src]
&'a self,
db: &'a Db<K, V>,
key: Option<(K, Option<V>)>
) -> RevCursor<'a, Self, K, V> where
K: Representable,
V: Representable,
fn root<K, V>(&mut self, root: usize) -> Option<Db<K, V>> where
K: Representable,
V: Representable, [src]
K: Representable,
V: Representable,
fn get<K, V>(&'a self, root: &Db<K, V>, key: K, value: Option<V>) -> Option<V> where
K: Representable,
V: Representable, [src]
K: Representable,
V: Representable,