Struct sanakirja::Env
[−]
[src]
pub struct Env { /* fields omitted */ }
Environment, required to start any transactions. Thread-safe, but opening the same database several times in the same process is not cross-platform.
Methods
impl Env
[src]
fn new<P: AsRef<Path>>(path: P, length: u64) -> Result<Env, Error>
Initialize environment. log_length must be at least log(PAGE_SIZE)
fn txn_begin<'env>(&'env self) -> Result<Txn<'env>, Error>
Start a read-only transaction.
fn mut_txn_begin<'env>(&'env self) -> Result<MutTxn<'env, ()>, Error>
Start a mutable transaction. Mutable transactions that go out of scope are automatically aborted.