pub struct Database { /* private fields */ }Expand description
A handle to an individual database in an environment.
A database handle denotes the name and parameters of a database in an environment.
Database is a simple data container holding the database handle index
(dbi) and its flags. It does not own any resources and can be freely
copied.
§Lifetime
The database handle is only valid within the lifetime of the environment
that created it. Users must ensure that Database instances are not used
after the environment has been closed.
Implementations§
Source§impl Database
impl Database
Sourcepub const fn freelist_db() -> Self
pub const fn freelist_db() -> Self
Opens the freelist database with DBI 0.
Sourcepub const fn dbi(&self) -> MDBX_dbi
pub const fn dbi(&self) -> MDBX_dbi
Returns the underlying MDBX database handle.
The caller must ensure that the handle is not used after the lifetime of the environment, or after the database has been closed.
Sourcepub const fn flags(&self) -> DatabaseFlags
pub const fn flags(&self) -> DatabaseFlags
Returns the database flags.
Trait Implementations§
impl Copy for Database
Auto Trait Implementations§
impl Freeze for Database
impl RefUnwindSafe for Database
impl Send for Database
impl Sync for Database
impl Unpin for Database
impl UnwindSafe for Database
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more