Skip to main content

EncryptedDatabaseOpener

Struct EncryptedDatabaseOpener 

Source
pub struct EncryptedDatabaseOpener<'e, T> { /* private fields */ }
Expand description

Used to create or open databases.

Implementations§

Source§

impl<'e, T> EncryptedDatabaseOpener<'e, T>

Source

pub fn database_options( &self, ) -> EncryptedDatabaseOpenOptions<'e, '_, T, Unspecified, Unspecified>

Options and flags which can be used to configure how an EncryptedDatabase is opened.

Source

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:

Source

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:

Auto Trait Implementations§

§

impl<'e, T> Freeze for EncryptedDatabaseOpener<'e, T>
where &'e EncryptedEnv<T>: Freeze,

§

impl<'e, T> RefUnwindSafe for EncryptedDatabaseOpener<'e, T>

§

impl<'e, T> Send for EncryptedDatabaseOpener<'e, T>
where &'e EncryptedEnv<T>: Send,

§

impl<'e, T> Sync for EncryptedDatabaseOpener<'e, T>
where &'e EncryptedEnv<T>: Sync,

§

impl<'e, T> Unpin for EncryptedDatabaseOpener<'e, T>
where &'e EncryptedEnv<T>: Unpin,

§

impl<'e, T> UnsafeUnpin for EncryptedDatabaseOpener<'e, T>
where &'e EncryptedEnv<T>: UnsafeUnpin,

§

impl<'e, T> UnwindSafe for EncryptedDatabaseOpener<'e, T>
where &'e EncryptedEnv<T>: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.