Struct kvdb_rocksdb::DatabaseConfig
source · [−]pub struct DatabaseConfig {
pub max_open_files: i32,
pub memory_budget: Option<usize>,
pub compaction: CompactionProfile,
pub columns: Option<u32>,
}
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: Option<u32>
Set number of columns
Implementations
sourceimpl DatabaseConfig
impl DatabaseConfig
sourcepub fn with_columns(columns: Option<u32>) -> Self
pub fn with_columns(columns: Option<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
Trait Implementations
sourceimpl Clone for DatabaseConfig
impl Clone for DatabaseConfig
sourcefn clone(&self) -> DatabaseConfig
fn clone(&self) -> DatabaseConfig
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Default for DatabaseConfig
impl Default for DatabaseConfig
sourcefn 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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more