[][src]Trait rkv::backend::BackendEnvironment

pub trait BackendEnvironment<'e>: Debug {
    type Error: BackendError;
    type Database: BackendDatabase;
    type Flags: BackendDatabaseFlags;
    type Stat: BackendStat;
    type Info: BackendInfo;
    type RoTransaction: BackendRoCursorTransaction<'e, Database = Self::Database>;
    type RwTransaction: BackendRwCursorTransaction<'e, Database = Self::Database>;
    fn open_db(&self, name: Option<&str>) -> Result<Self::Database, Self::Error>;
fn create_db(
        &self,
        name: Option<&str>,
        flags: Self::Flags
    ) -> Result<Self::Database, Self::Error>;
fn begin_ro_txn(&'e self) -> Result<Self::RoTransaction, Self::Error>;
fn begin_rw_txn(&'e self) -> Result<Self::RwTransaction, Self::Error>;
fn sync(&self, force: bool) -> Result<(), Self::Error>;
fn stat(&self) -> Result<Self::Stat, Self::Error>;
fn info(&self) -> Result<Self::Info, Self::Error>;
fn freelist(&self) -> Result<usize, Self::Error>;
fn load_ratio(&self) -> Result<Option<f32>, Self::Error>;
fn set_map_size(&self, size: usize) -> Result<(), Self::Error>; }

Associated Types

Loading content...

Required methods

fn open_db(&self, name: Option<&str>) -> Result<Self::Database, Self::Error>

fn create_db(
    &self,
    name: Option<&str>,
    flags: Self::Flags
) -> Result<Self::Database, Self::Error>

fn begin_ro_txn(&'e self) -> Result<Self::RoTransaction, Self::Error>

fn begin_rw_txn(&'e self) -> Result<Self::RwTransaction, Self::Error>

fn sync(&self, force: bool) -> Result<(), Self::Error>

fn stat(&self) -> Result<Self::Stat, Self::Error>

fn info(&self) -> Result<Self::Info, Self::Error>

fn freelist(&self) -> Result<usize, Self::Error>

fn load_ratio(&self) -> Result<Option<f32>, Self::Error>

fn set_map_size(&self, size: usize) -> Result<(), Self::Error>

Loading content...

Implementors

impl<'e> BackendEnvironment<'e> for rkv::backend::LmdbEnvironment[src]

type Database = DatabaseImpl

type Error = ErrorImpl

type Flags = DatabaseFlagsImpl

type Info = InfoImpl

type RoTransaction = RoTransactionImpl<'e>

type RwTransaction = RwTransactionImpl<'e>

type Stat = StatImpl

impl<'e> BackendEnvironment<'e> for rkv::backend::SafeModeEnvironment[src]

type Database = DatabaseImpl

type Error = ErrorImpl

type Flags = DatabaseFlagsImpl

type Info = InfoImpl

type RoTransaction = RoTransactionImpl<'e>

type RwTransaction = RwTransactionImpl<'e>

type Stat = StatImpl

Loading content...