[][src]Struct libdb::db::DatabaseBuilder

pub struct DatabaseBuilder<'a> { /* fields omitted */ }

DatabaseBuilder is used to configure and open a database.

Methods

impl<'a> DatabaseBuilder<'a>[src]

pub fn new() -> DatabaseBuilder<'a>[src]

Create a new DatabaseBuilder.

pub fn environment(self, env: &Environment) -> Self[src]

Open the database within an environment.

pub fn transaction(self, txn: &'a Transaction) -> Self[src]

Open the database within a transaction.

pub fn file<P: AsRef<Path>>(self, file: P) -> Self[src]

Specify the database file.

pub fn name(self, name: &str) -> Self[src]

Specify the database name.

pub fn flags(self, flags: Flags) -> Self[src]

Set the database flags.

pub fn mode(self, mode: i32) -> Self[src]

Set the file mode.

pub fn db_type(self, db_type: DbType) -> Self[src]

Set the database type.

pub fn open(self) -> Result<Database, Error>[src]

Open the database represented by the file and database.

Panics

Panics if libdb fails to create the DB struct (e.g. malloc error).

Auto Trait Implementations

impl<'a> RefUnwindSafe for DatabaseBuilder<'a>

impl<'a> !Send for DatabaseBuilder<'a>

impl<'a> !Sync for DatabaseBuilder<'a>

impl<'a> Unpin for DatabaseBuilder<'a>

impl<'a> UnwindSafe for DatabaseBuilder<'a>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.