[][src]Struct sanakirja::Txn

pub struct Txn<'env> { /* fields omitted */ }

An immutable transaction.

Methods

impl<'a> Txn<'a>[src]

pub fn statistics(&self) -> Statistics[src]

Compute statistics about pages. This is a potentially costlty operation, as we need to go through all bookkeeping pages.

pub fn references<K: Representable, V: Representable>(
    &self,
    h: &mut HashSet<u64>,
    root: Db<K, V>
)
[src]

Fills the h argument with the set of all pages referenced at least once in the tree whose root is root.

Trait Implementations

impl<'env> Transaction for Txn<'env>[src]

Important traits for DbIterator<'a, T, K, V>
fn iter<'a, K: Representable, V: Representable>(
    &'a self,
    db: &'a Db<K, V>,
    key: Option<(K, Option<V>)>
) -> DbIterator<'a, Self, K, V>
[src]

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 more

Important traits for RevDbIterator<'a, T, K, V>
fn rev_iter<'a, K: Representable, V: Representable>(
    &'a self,
    db: &'a Db<K, V>,
    key: Option<(K, Option<V>)>
) -> RevDbIterator<'a, Self, K, V>
[src]

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 set_cursors<K: Representable, V: Representable>(
    &self,
    root: &Db<K, V>,
    key: Option<(K, Option<V>)>
) -> (Cursor, bool)
[src]

Create a cursor positionned just before key.

fn root<K: Representable, V: Representable>(
    &self,
    root: usize
) -> Option<Db<K, V>>
[src]

Gets the specified root. At most 508 different roots are allowed.

fn get<'a, K: Representable, V: Representable>(
    &'a self,
    root: &Db<K, V>,
    key: K,
    value: Option<V>
) -> Option<V>
[src]

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 more

impl<'env> Drop for Txn<'env>[src]

Auto Trait Implementations

impl<'env> Send for Txn<'env>

impl<'env> Unpin for Txn<'env>

impl<'env> Sync for Txn<'env>

impl<'env> !UnwindSafe for Txn<'env>

impl<'env> !RefUnwindSafe for Txn<'env>

Blanket Implementations

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]