pub struct WalOptions {
pub root_path: PathBuf,
pub max_segment_size: u64,
pub max_entries_per_segment: u64,
pub max_open_segments: usize,
pub write_buffer_size: usize,
pub read_buffer_size: usize,
pub block_cache_size: Option<u64>,
pub sync_mode: SyncMode,
pub compression: CompressionType,
pub read_strategy: ReadStrategy,
pub on_corruption: CorruptionPolicy,
pub min_compression_size: usize,
}Fields§
§root_path: PathBufBase directory where stream directories are created.
max_segment_size: u64Soft limit for segment file size in bytes. A new segment is created if the current one exceeds this size. Default: 64 MB.
max_entries_per_segment: u64Soft limit for number of entries per segment. A new segment is created if the current one exceeds this count. Default: u64::MAX (Disabled).
max_open_segments: usizeMaximum number of file descriptors to keep open simultaneously for writing. Uses an LRU policy to enforce this limit. Default: 50.
write_buffer_size: usizeSize of the in-memory write buffer before flushing to the OS kernel. Default: 64 KB.
read_buffer_size: usizeSize of the buffer used for reading/scanning files. Default: 128 KB.
block_cache_size: Option<u64>Size of the Read Block Cache (in bytes). If None, caching is disabled. Default: None.
sync_mode: SyncMode§compression: CompressionType§read_strategy: ReadStrategy§on_corruption: CorruptionPolicy§min_compression_size: usizeIf a batch is smaller than this (in bytes), it will be written
uncompressed even if compression is enabled.
Default: 1 KB.
Implementations§
Trait Implementations§
Source§impl Clone for WalOptions
impl Clone for WalOptions
Source§fn clone(&self) -> WalOptions
fn clone(&self) -> WalOptions
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for WalOptions
impl Debug for WalOptions
Auto Trait Implementations§
impl Freeze for WalOptions
impl RefUnwindSafe for WalOptions
impl Send for WalOptions
impl Sync for WalOptions
impl Unpin for WalOptions
impl UnwindSafe for WalOptions
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
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>
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