pub struct DbOptions {
pub create_if_missing: bool,
pub memtable_flush_threshold: usize,
pub edge_uniqueness: bool,
pub compact_after_n_flushes: u32,
pub wal_sync_mode: WalSyncMode,
pub memtable_hard_cap_bytes: usize,
}Expand description
Options for opening a database.
Fields§
§create_if_missing: bool§memtable_flush_threshold: usize§edge_uniqueness: bool§compact_after_n_flushes: u32Trigger compaction automatically after this many flushes. 0 = disabled.
wal_sync_mode: WalSyncModeWAL sync mode. Default: WalSyncMode::GroupCommit.
memtable_hard_cap_bytes: usizeHard cap on memtable size in bytes. When the memtable reaches this size, writes trigger a synchronous flush before proceeding. 0 = disabled. Should be >= memtable_flush_threshold when both are non-zero. Note: batch operations check backpressure once before writing; a single large batch may temporarily exceed the cap.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for DbOptions
impl RefUnwindSafe for DbOptions
impl Send for DbOptions
impl Sync for DbOptions
impl Unpin for DbOptions
impl UnsafeUnpin for DbOptions
impl UnwindSafe for DbOptions
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