Struct sanakirja::MutTxn[][src]

pub struct MutTxn<E: Borrow<Env>, T> { /* fields omitted */ }

A mutable transaction.

Implementations

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

pub fn set_root(&mut self, num: usize, value: u64)[src]

Setting the numth element of the initial page, treated as a [u64; 510], to value. This doesn’t actually write anything to that page, since that page is written during the commit.

In the current implementation, value is probably going to be the offset in the file of the root page of a B tree.

pub fn remove_root(&mut self, num: usize)[src]

Setting the numth element of the initial page, treated as a [u64; 510].

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

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

Low-level method to get the root page number n, if that page isn’t a B tree (use the RootDb trait else).

Trait Implementations

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

fn alloc_page(&mut self) -> Result<MutPage, Error>[src]

Allocate a single page.

fn incr_rc(&mut self, off: u64) -> Result<usize, Error>[src]

Increment the reference count for page off.

impl<'a, E: Borrow<Env>, T> Commit for MutTxn<E, &'a mut MutTxn<E, T>>[src]

The following is very easy, we’re just extending all values of the current transaction with values of the subtransaction.

impl<E: Borrow<Env>> Commit for MutTxn<E, ()>[src]

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

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

When dropping a transaction, we need to unlock the read-write locks internal to this process, and possibly the file locks.

impl<E: Borrow<Env>, A> LoadPage for MutTxn<E, A>[src]

type Error = Error

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

Auto Trait Implementations

impl<E, T> RefUnwindSafe for MutTxn<E, T> where
    E: RefUnwindSafe,
    T: RefUnwindSafe

impl<E, T> !Send for MutTxn<E, T>

impl<E, T> !Sync for MutTxn<E, T>

impl<E, T> Unpin for MutTxn<E, T> where
    E: Unpin,
    T: Unpin

impl<E, T> UnwindSafe for MutTxn<E, T> where
    E: UnwindSafe,
    T: UnwindSafe

Blanket Implementations

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

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

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

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.