[−][src]Struct libdb::db::DatabaseBuilder
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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,