pub struct Config {Show 17 fields
pub data_dir: PathBuf,
pub default_ttl_secs: Option<u64>,
pub gc_interval_secs: u64,
pub memtable_size_mb: usize,
pub max_frozen_memtables: usize,
pub block_size: usize,
pub zstd_level: i32,
pub flush_interval_ms: u64,
pub time_bucket_secs: u64,
pub index_memory_budget_mb: usize,
pub block_cache_capacity_mb: usize,
pub bloom_bits_per_key: usize,
pub wal_segment_size_mb: u64,
pub compaction_threshold: usize,
pub create_if_missing: bool,
pub wal_sync_mode: SyncMode,
pub auto_background: bool,
}Fields§
§data_dir: PathBuf§default_ttl_secs: Option<u64>§gc_interval_secs: u64§memtable_size_mb: usize§max_frozen_memtables: usize§block_size: usize§zstd_level: i32§flush_interval_ms: u64§time_bucket_secs: u64§index_memory_budget_mb: usize§block_cache_capacity_mb: usize§bloom_bits_per_key: usize§wal_segment_size_mb: u64§compaction_threshold: usize§create_if_missing: bool§wal_sync_mode: SyncModeControls how the WAL is synchronised to stable storage.
Always guarantees every acknowledged write is on disk before
returning. IntervalMs(n) batches fsync calls up to every n
milliseconds for higher throughput at the cost of potentially
losing the most recent writes on power failure.
auto_background: boolWhen true, the engine automatically spawns a background task that
periodically flushes the memtable, compacts SSTables, garbage-collects
expired data, and syncs the WAL (for IntervalMs mode). Set to false
in tests that want full control over when flush/compact/GC occur.
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Config
impl<'de> Deserialize<'de> for Config
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
Auto Trait Implementations§
impl Freeze for Config
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnsafeUnpin for Config
impl UnwindSafe for Config
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