pub struct IncrementalConfig {
pub checkpoint_threshold: usize,
pub wal_sync_interval: usize,
pub max_wal_size: usize,
pub checkpoint_codec: Codec,
pub sync_on_write: bool,
pub keep_checkpoints: usize,
}Expand description
Configuration for incremental storage
Fields§
§checkpoint_threshold: usizeNumber of WAL operations before triggering automatic checkpoint
wal_sync_interval: usizeNumber of WAL operations before syncing to disk
max_wal_size: usizeMaximum WAL file size in bytes before forcing checkpoint
checkpoint_codec: CodecCompression codec for checkpoints
sync_on_write: boolWhether to fsync after each WAL write (slower but safer)
keep_checkpoints: usizeKeep old checkpoints for rollback (0 = delete immediately)
Implementations§
Source§impl IncrementalConfig
impl IncrementalConfig
Sourcepub fn with_checkpoint_threshold(self, threshold: usize) -> Self
pub fn with_checkpoint_threshold(self, threshold: usize) -> Self
Set checkpoint threshold
Sourcepub fn with_wal_sync_interval(self, interval: usize) -> Self
pub fn with_wal_sync_interval(self, interval: usize) -> Self
Set WAL sync interval
Sourcepub fn with_max_wal_size(self, size: usize) -> Self
pub fn with_max_wal_size(self, size: usize) -> Self
Set maximum WAL size
Sourcepub fn with_checkpoint_codec(self, codec: Codec) -> Self
pub fn with_checkpoint_codec(self, codec: Codec) -> Self
Set checkpoint compression codec
Sourcepub fn with_sync_on_write(self, sync: bool) -> Self
pub fn with_sync_on_write(self, sync: bool) -> Self
Enable sync on every write (safer but slower)
Sourcepub fn with_keep_checkpoints(self, count: usize) -> Self
pub fn with_keep_checkpoints(self, count: usize) -> Self
Set number of old checkpoints to keep
Trait Implementations§
Source§impl Clone for IncrementalConfig
impl Clone for IncrementalConfig
Source§fn clone(&self) -> IncrementalConfig
fn clone(&self) -> IncrementalConfig
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 IncrementalConfig
impl Debug for IncrementalConfig
Source§impl Default for IncrementalConfig
impl Default for IncrementalConfig
Source§impl<'de> Deserialize<'de> for IncrementalConfig
impl<'de> Deserialize<'de> for IncrementalConfig
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 IncrementalConfig
impl RefUnwindSafe for IncrementalConfig
impl Send for IncrementalConfig
impl Sync for IncrementalConfig
impl Unpin for IncrementalConfig
impl UnsafeUnpin for IncrementalConfig
impl UnwindSafe for IncrementalConfig
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more