Struct sanakirja::MutTxn [] [src]

pub struct MutTxn<'env, T> { /* fields omitted */ }

A mutable transaction.

Methods

impl<'env, T> MutTxn<'env, T>
[src]

Start a mutable transaction.

Allocate a single page.

impl<'env, T> MutTxn<'env, T>
[src]

Insert a binding to a database, returning false if and only if the exact same binding (key and value) was already in the database.

impl<'env, T> MutTxn<'env, T>
[src]

If value is None, delete the first binding associated to key from the database. Else, delete the specified binding if present.

impl<'env, T> MutTxn<'env, T>
[src]

Creates a new database, complexity O(1).

Sets the specified root to the given value. At most 508 different roots are allowed.

Fork a database, in O(log n), where n is the number of pages with reference count at least 2 (this complexity is also O(log |db|)).

Drop a database, in O(n).

Trait Implementations

impl<'env, T> Drop for MutTxn<'env, T>
[src]

A method called when the value goes out of scope. Read more

impl<'a, 'env, T> Commit for MutTxn<'env, &'a mut MutTxn<'env, T>>
[src]

Commit the transaction.

impl<'env> Commit for MutTxn<'env, ()>
[src]

Commit a transaction. This is guaranteed to be atomic: either the commit succeeds, and all the changes made during the transaction are written to disk. Or the commit doesn't succeed, and we're back to the state just before starting the transaction.

impl<'env, T> Transaction for MutTxn<'env, T>
[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

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()).

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

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