pub struct DatabaseConfig {
pub allow_create: bool,
pub sorted_duplicates: bool,
pub key_prefixing: bool,
pub temporary: bool,
pub transactional: bool,
pub read_only: bool,
pub node_max_entries: i32,
pub deferred_write: bool,
}Expand description
Configuration for a database.
Fields§
§allow_create: boolAllow database creation if it doesn’t exist.
sorted_duplicates: boolEnable sorted duplicates.
key_prefixing: boolEnable key prefixing compression.
temporary: boolDatabase is temporary (not persisted).
transactional: boolDatabase operations are transactional.
read_only: boolDatabase is read-only.
node_max_entries: i32Maximum entries per node.
deferred_write: boolDeferred write: skip WAL logging; flush only at eviction/checkpoint.
Implementations§
Source§impl DatabaseConfig
impl DatabaseConfig
Sourcepub fn set_allow_create(&mut self, allow_create: bool) -> &mut Self
pub fn set_allow_create(&mut self, allow_create: bool) -> &mut Self
Sets the allow_create flag.
Sourcepub fn set_sorted_duplicates(&mut self, sorted_duplicates: bool) -> &mut Self
pub fn set_sorted_duplicates(&mut self, sorted_duplicates: bool) -> &mut Self
Sets the sorted_duplicates flag.
Sourcepub fn set_key_prefixing(&mut self, key_prefixing: bool) -> &mut Self
pub fn set_key_prefixing(&mut self, key_prefixing: bool) -> &mut Self
Sets the key_prefixing flag.
Sourcepub fn set_temporary(&mut self, temporary: bool) -> &mut Self
pub fn set_temporary(&mut self, temporary: bool) -> &mut Self
Sets the temporary flag.
Sourcepub fn set_transactional(&mut self, transactional: bool) -> &mut Self
pub fn set_transactional(&mut self, transactional: bool) -> &mut Self
Sets the transactional flag.
Sourcepub fn set_read_only(&mut self, read_only: bool) -> &mut Self
pub fn set_read_only(&mut self, read_only: bool) -> &mut Self
Sets the read_only flag.
Sourcepub fn set_node_max_entries(&mut self, max: i32) -> &mut Self
pub fn set_node_max_entries(&mut self, max: i32) -> &mut Self
Sets the maximum entries per node.
Trait Implementations§
Source§impl Clone for DatabaseConfig
impl Clone for DatabaseConfig
Source§fn clone(&self) -> DatabaseConfig
fn clone(&self) -> DatabaseConfig
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 Debug for DatabaseConfig
impl Debug for DatabaseConfig
Auto Trait Implementations§
impl Freeze for DatabaseConfig
impl RefUnwindSafe for DatabaseConfig
impl Send for DatabaseConfig
impl Sync for DatabaseConfig
impl Unpin for DatabaseConfig
impl UnsafeUnpin for DatabaseConfig
impl UnwindSafe for DatabaseConfig
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