Struct sanakirja::MutTxn

source ·
pub struct MutTxn<'env, T> { /* private fields */ }
Expand description

A mutable transaction.

Implementations

Start a mutable transaction.

Allocate a single page.

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

If value is None, delete one of the bindings associated to key from the database (without any specific preference). Else, delete the specified binding if present.

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

Commit the transaction.

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.

Executes the destructor for this type. Read more
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

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

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

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.