pub struct MdbxDatabase { /* private fields */ }Expand description
Wrapper around the mdbx database handle. A database can hold multiple tables.
Implementations§
Source§impl MdbxDatabase
impl MdbxDatabase
Sourcepub fn new<P: AsRef<Path>>(
path: P,
config: DatabaseConfig,
) -> Result<Self, Error>
pub fn new<P: AsRef<Path>>( path: P, config: DatabaseConfig, ) -> Result<Self, Error>
Creates a new database at the given path.
Sourcepub fn new_volatile(config: DatabaseConfig) -> Result<Self, Error>
pub fn new_volatile(config: DatabaseConfig) -> Result<Self, Error>
Creates a volatile database (in a temporary directory, which cleans itself after use).
Trait Implementations§
Source§impl Clone for MdbxDatabase
impl Clone for MdbxDatabase
Source§fn clone(&self) -> MdbxDatabase
fn clone(&self) -> MdbxDatabase
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Database for MdbxDatabase
impl Database for MdbxDatabase
Source§fn create_regular_table<T: RegularTable>(&self, table: &T)
fn create_regular_table<T: RegularTable>(&self, table: &T)
Creates a regular table (no-duplicates).
Source§fn create_dup_table<T: DupTable>(&self, table: &T)
fn create_dup_table<T: DupTable>(&self, table: &T)
Creates a regular table (no-duplicates).
type ReadTransaction<'db> = MdbxReadTransaction<'db>
type WriteTransaction<'db> = MdbxWriteTransaction<'db>
Source§fn read_transaction(&self) -> Self::ReadTransaction<'_>
fn read_transaction(&self) -> Self::ReadTransaction<'_>
Creates a read transaction.
Source§fn write_transaction(&self) -> Self::WriteTransaction<'_>
fn write_transaction(&self) -> Self::WriteTransaction<'_>
Creates a read/write transaction.
Auto Trait Implementations§
impl Freeze for MdbxDatabase
impl RefUnwindSafe for MdbxDatabase
impl Send for MdbxDatabase
impl Sync for MdbxDatabase
impl Unpin for MdbxDatabase
impl UnsafeUnpin for MdbxDatabase
impl UnwindSafe for MdbxDatabase
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