Struct kvdb_rocksdb::DatabaseConfig
source · pub struct DatabaseConfig {
pub max_open_files: i32,
pub memory_budget: Option<usize>,
pub compaction: CompactionProfile,
pub columns: u32,
pub disable_wal: bool,
}
Expand description
Database configuration
Fields§
§max_open_files: i32
Max number of open files.
memory_budget: Option<usize>
Memory budget (in MiB) used for setting block cache size, write buffer size.
compaction: CompactionProfile
Compaction profile
columns: u32
Set number of columns
disable_wal: bool
Disable WAL if set to true
Implementations§
source§impl DatabaseConfig
impl DatabaseConfig
sourcepub fn with_columns(columns: u32) -> Self
pub fn with_columns(columns: u32) -> Self
Create new DatabaseConfig
with default parameters and specified set of
columns. Note that cache sizes must be explicitly set.
pub fn memory_budget(&self) -> usize
pub fn memory_budget_per_col(&self) -> usize
pub fn memory_budget_mb(&self) -> usize
Trait Implementations§
source§impl Clone for DatabaseConfig
impl Clone for DatabaseConfig
source§fn clone(&self) -> DatabaseConfig
fn clone(&self) -> DatabaseConfig
Returns a copy 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 Default for DatabaseConfig
impl Default for DatabaseConfig
source§fn default() -> DatabaseConfig
fn default() -> DatabaseConfig
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl RefUnwindSafe for DatabaseConfig
impl Send for DatabaseConfig
impl Sync for DatabaseConfig
impl Unpin 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