Struct sanakirja::Env[][src]

pub struct Env { /* fields omitted */ }
Expand description

An environment, which may be either a memory-mapped file, or memory allocated with std::alloc.

Implementations

Start a mutable transaction. Mutable transactions that go out of scope are automatically aborted.

Same as new, but does not create any lock on the file system.

The database is very likely to get corrupted if an environment is opened from multiple processes, or more than once by the same process, if at least one of these instances can start a mutable transaction.

The n_roots argument is ignored if the database already exists, and is used to initialise the first n_roots pages of the file else.

Initialize an environment. If length is not a multiple of 4096, it is rounded to the next multiple of the page size (4096 bytes).

The n_roots parameter is the maximum number of versions that can be alive at the same time, before mut_txn_begin must wait for old readers to stop.

If n_roots is 1, mutable transactions exclude all readers.

Create a new anonymous database, backed by memory. The length is the total size in bytes of the database.

Start a read-only transaction.

Trait Implementations

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.