Struct sanakirja::Txn[][src]

pub struct Txn<E: Borrow<Env>> { /* fields omitted */ }
Expand description

An immutable transaction.

Implementations

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

pub fn root(&self, n: usize) -> u64[src]

A “raw” version of the root_db method, useful to store things other than databases.

Trait Implementations

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

fn drop(&mut self)[src]

Executes the destructor for this type. Read more

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

fn load_page(&self, off: u64) -> Result<CowPage, Self::Error>[src]

Find the appropriate map segment

type Error = Error

fn rc(&self, _: u64) -> Result<u64, Self::Error>[src]

Reference-counting. Since reference-counts are designed to be storable into B trees by external allocators, pages referenced once aren’t stored, and hence are indistinguishable from pages that are never referenced. The default implementation returns 0. Read more

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.

Auto Trait Implementations

impl<E> RefUnwindSafe for Txn<E> where
    E: RefUnwindSafe

impl<E> Send for Txn<E> where
    E: Send

impl<E> Sync for Txn<E> where
    E: Sync

impl<E> Unpin for Txn<E> where
    E: Unpin

impl<E> UnwindSafe for Txn<E> where
    E: UnwindSafe

Blanket Implementations

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

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

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

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

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

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

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

pub fn from(t: T) -> T[src]

Performs the conversion.

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

pub fn into(self) -> U[src]

Performs the conversion.

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.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

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.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.