pub struct WalConfig { /* private fields */ }Implementations§
Source§impl WalConfig
impl WalConfig
Sourcepub fn new(file_path: impl AsRef<Path>) -> Self
pub fn new(file_path: impl AsRef<Path>) -> Self
Default: same directory as the file_path
The path to write the write ahead log. Advanced users may want to change the WAL to point to a different location to leverage different storage patterns (WAL is always sequence write and requires durability).
Sourcepub fn flush_interval(&mut self, interval: Duration) -> &mut Self
pub fn flush_interval(&mut self, interval: Duration) -> &mut Self
Default: 1ms
Sourcepub fn segment_size(&mut self, size: usize) -> &mut Self
pub fn segment_size(&mut self, size: usize) -> &mut Self
Default: 1MB
Sourcepub fn storage_backend(&mut self, backend: StorageBackend) -> &mut Self
pub fn storage_backend(&mut self, backend: StorageBackend) -> &mut Self
Default: Std
Change the storage backend for potentially better performance, e.g., IoUring on Linux.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for WalConfig
impl RefUnwindSafe for WalConfig
impl Send for WalConfig
impl Sync for WalConfig
impl Unpin for WalConfig
impl UnwindSafe for WalConfig
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