Trait sanakirja::RootDb[][src]

pub trait RootDb {
    fn root_db<K: Storable + ?Sized, V: Storable + ?Sized, P: BTreePage<K, V>>(
        &self,
        n: usize
    ) -> Option<Db_<K, V, P>>; }

The trait, implemented by Txn and MutTxn, for treating the 4064 bytes after the header of root pages as pointers to B trees (well, actually Option of pointers to databases, where None is encoded by 0).

Required methods

fn root_db<K: Storable + ?Sized, V: Storable + ?Sized, P: BTreePage<K, V>>(
    &self,
    n: usize
) -> Option<Db_<K, V, P>>
[src]

Return the database stored in the root page of the current transaction at index n, if any.

Loading content...

Implementors

impl<E: Borrow<Env>> RootDb for Txn<E>[src]

fn root_db<K: Storable + ?Sized, V: Storable + ?Sized, P: BTreePage<K, V>>(
    &self,
    n: usize
) -> Option<Db_<K, V, P>>
[src]

This is a straightforward implementation of just accessing index n.

impl<E: Borrow<Env>, T> RootDb for MutTxn<E, T>[src]

Loading content...