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
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
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
Source§impl PartialEq for EnvironmentKind
impl PartialEq 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> WithSubscriber for T
impl<T> WithSubscriber for T
§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where
S: Into<Dispatch>,
§fn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 1 byte
Size for each variant:
Default
: 0 bytesWriteMap
: 0 bytes