pub enum EnvironmentKind {
Default,
WriteMap,
}Expand description
Determines how data is mapped into memory
It only takes affect when the environment is opened.
Variants§
Default
Open the environment in default mode, without WRITEMAP.
WriteMap
Open the environment as mdbx-WRITEMAP.
Use a writeable memory map unless the environment is opened as MDBX_RDONLY
(crate::Mode::ReadOnly).
All data will be mapped into memory in the read-write mode crate::Mode::ReadWrite. This
offers a significant performance benefit, since the data will be modified directly in
mapped memory and then flushed to disk by single system call, without any memory
management nor copying.
This mode is incompatible with nested transactions.
Implementations§
Source§impl EnvironmentKind
impl EnvironmentKind
Sourcepub const fn is_write_map(&self) -> bool
pub const fn is_write_map(&self) -> bool
Returns true if the environment was opened as WRITEMAP.
Trait Implementations§
Source§impl Clone for EnvironmentKind
impl Clone for EnvironmentKind
Source§fn clone(&self) -> EnvironmentKind
fn clone(&self) -> EnvironmentKind
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for EnvironmentKind
impl Debug for EnvironmentKind
Source§impl Default for EnvironmentKind
impl Default for EnvironmentKind
Source§fn default() -> EnvironmentKind
fn default() -> EnvironmentKind
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for EnvironmentKind
impl<'de> Deserialize<'de> for EnvironmentKind
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for EnvironmentKind
impl PartialEq for EnvironmentKind
Source§impl Serialize for EnvironmentKind
impl Serialize for EnvironmentKind
impl Copy for EnvironmentKind
impl Eq for EnvironmentKind
impl StructuralPartialEq for EnvironmentKind
Auto Trait Implementations§
impl Freeze for EnvironmentKind
impl RefUnwindSafe for EnvironmentKind
impl Send for EnvironmentKind
impl Sync for EnvironmentKind
impl Unpin for EnvironmentKind
impl UnwindSafe for EnvironmentKind
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.