Struct sanakirja::MutTxn[][src]

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

A mutable transaction.

Implementations

Borrow env

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.

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

The root page of this transaction (use with caution, this page contains root databases).

The root page of this transaction.

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

Allocate a single page.

Increment the reference count for page off.

Decrement the page’s reference count, assuming the page was first allocated by another transaction. If the RC reaches 0, free the page. Must return the new RC (0 if freed). Read more

Same as Self::decr_rc, but for pages allocated by the current transaction. This is an important distinction, as pages allocated by the current transaction can be reused immediately after being freed. Read more

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

Commit the transaction.

Commit the transaction.

Formats the value using the given formatter. Read more

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

Executes the destructor for this type. Read more

Loading a page.

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

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

The root page of this transaction.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.