pub struct EncryptedDatabaseOpener<'e, T> { /* private fields */ }Expand description
Used to create or open databases.
Implementations§
Source§impl<'e, T> EncryptedDatabaseOpener<'e, T>
impl<'e, T> EncryptedDatabaseOpener<'e, T>
Sourcepub fn database_options(
&self,
) -> EncryptedDatabaseOpenOptions<'e, '_, T, Unspecified, Unspecified>
pub fn database_options( &self, ) -> EncryptedDatabaseOpenOptions<'e, '_, T, Unspecified, Unspecified>
Options and flags which can be used to configure how an EncryptedDatabase is opened.
Sourcepub fn open_database<KC, DC>(
&self,
rtxn: &RoTxn<'e>,
name: Option<&str>,
) -> Result<Option<EncryptedDatabase<'e, KC, DC>>>where
KC: 'static,
DC: 'static,
pub fn open_database<KC, DC>(
&self,
rtxn: &RoTxn<'e>,
name: Option<&str>,
) -> Result<Option<EncryptedDatabase<'e, KC, DC>>>where
KC: 'static,
DC: 'static,
Opens a typed database that already exists in this environment.
If the database was previously opened in this program run, types will be checked.
§Important Information
LMDB has an important restriction on the unnamed database when named ones are opened. The names of the named databases are stored as keys in the unnamed one and are immutable, and these keys can only be read and not written.
§Panics
Calling this method will panic if used with a transaction:
- Coming from another environment.
- Which is not the one that was passed to
EncryptedEnv::open_databases_and_commit.
Sourcepub fn create_database<KC, DC>(
&self,
wtxn: &mut RwTxn<'e>,
name: Option<&str>,
) -> Result<EncryptedDatabase<'e, KC, DC>>where
KC: 'static,
DC: 'static,
pub fn create_database<KC, DC>(
&self,
wtxn: &mut RwTxn<'e>,
name: Option<&str>,
) -> Result<EncryptedDatabase<'e, KC, DC>>where
KC: 'static,
DC: 'static,
Creates a typed database that can already exist in this environment.
If the database was previously opened during this program run, types will be checked.
§Important Information
LMDB has an important restriction on the unnamed database when named ones are opened. The names of the named databases are stored as keys in the unnamed one and are immutable, and these keys can only be read and not written.
§Panics
Calling this method will panic if used with a transaction:
- Coming from another environment.
- Which is not the one that was passed to
EncryptedEnv::create_databases_and_commit.