Struct lmdb_rs::core::Environment [] [src]

pub struct Environment {
    // some fields omitted
}

Represents LMDB Environment. Should be opened using EnvBuilder

Methods

impl Environment
[src]

fn new() -> EnvBuilder

fn reader_check(&self) -> MdbResult<c_int>

Check for stale entries in the reader lock table.

Returns the number of stale slots that were cleared.

fn stat(&self) -> MdbResult<MDB_stat>

Retrieve environment statistics

fn info(&self) -> MdbResult<MDB_envinfo>

fn sync(&self, force: bool) -> MdbResult<()>

Sync environment to disk

fn set_flags(&mut self, flags: EnvFlags, turn_on: bool) -> MdbResult<()>

This one sets only flags which are available for change even after opening, see also get_flags and get_all_flags

fn get_flags(&self) -> MdbResult<EnvFlags>

Get flags of environment, which could be changed after it was opened use get_all_flags if you need also creation time flags

fn get_all_flags(&self) -> MdbResult<EnvCreateFlags>

Get all flags of environment, including which were specified on creation See also get_flags if you're interested only in modifiable flags

fn get_maxreaders(&self) -> MdbResult<c_uint>

fn get_maxkeysize(&self) -> c_int

fn copy_to_fd(&self, fd: mdb_filehandle_t) -> MdbResult<()>

Creates a backup copy in specified file descriptor

fn get_fd(&self) -> MdbResult<mdb_filehandle_t>

Gets file descriptor of this environment

fn copy_to_path(&self, path: &Path) -> MdbResult<()>

Creates a backup copy in specified path

fn new_transaction(&self) -> MdbResult<Transaction>

Creates a new read-write transaction

Use get_reader to get much faster lock-free alternative

fn get_reader(&self) -> MdbResult<ReadonlyTransaction>

Creates a readonly transaction

fn get_db(&self, db_name: &str, flags: DbFlags) -> MdbResult<DbHandle>

Opens existing DB

fn create_db(&self, db_name: &str, flags: DbFlags) -> MdbResult<DbHandle>

Opens or creates a DB

fn get_default_db(&self, flags: DbFlags) -> MdbResult<DbHandle>

Opens default DB with specified flags

Trait Implementations

impl Sync for Environment
[src]

impl Send for Environment
[src]

impl Clone for Environment
[src]

fn clone(&self) -> Environment

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)
1.0.0

Performs copy-assignment from source. Read more