pub struct PersistenceConfig {
pub channel_capacity: usize,
pub flush_interval_ms: u64,
pub flush_count: usize,
pub durability_mode: DurabilityMode,
}Expand description
Configuration for the persistence engine
Fields§
§channel_capacity: usizeMaximum number of entries in the channel before backpressure
flush_interval_ms: u64Time-based flush interval in milliseconds
flush_count: usizeCount-based flush threshold
durability_mode: DurabilityModeDurability mode controlling WAL behavior
Implementations§
Source§impl PersistenceConfig
impl PersistenceConfig
Sourcepub fn from_durability_config(config: &DurabilityConfig) -> Self
pub fn from_durability_config(config: &DurabilityConfig) -> Self
Create configuration from a DurabilityConfig
Sourcepub fn writes_wal(&self) -> bool
pub fn writes_wal(&self) -> bool
Returns true if this configuration writes to WAL
Sourcepub fn sync_on_commit(&self) -> bool
pub fn sync_on_commit(&self) -> bool
Returns true if this configuration syncs on commit
Sourcepub fn sync_on_every_op(&self) -> bool
pub fn sync_on_every_op(&self) -> bool
Returns true if this configuration syncs on every operation
Trait Implementations§
Source§impl Clone for PersistenceConfig
impl Clone for PersistenceConfig
Source§fn clone(&self) -> PersistenceConfig
fn clone(&self) -> PersistenceConfig
Returns a duplicate 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 Debug for PersistenceConfig
impl Debug for PersistenceConfig
Auto Trait Implementations§
impl Freeze for PersistenceConfig
impl RefUnwindSafe for PersistenceConfig
impl Send for PersistenceConfig
impl Sync for PersistenceConfig
impl Unpin for PersistenceConfig
impl UnwindSafe for PersistenceConfig
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