pub enum FsyncPolicy {
PerWrite,
PerBatch,
Periodic(Duration),
}Expand description
WAL fsync policy — controls the durability vs. performance trade-off.
Variants§
PerWrite
Call fsync() after every single write. Maximum durability, lowest throughput.
PerBatch
Call fsync() after each batch commit. Balances durability and throughput (default).
Periodic(Duration)
Call fsync() periodically at the given interval. Highest throughput, risk of data loss
on crash up to one interval.
Trait Implementations§
Source§impl Clone for FsyncPolicy
impl Clone for FsyncPolicy
Source§fn clone(&self) -> FsyncPolicy
fn clone(&self) -> FsyncPolicy
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 FsyncPolicy
impl Debug for FsyncPolicy
Source§impl Default for FsyncPolicy
impl Default for FsyncPolicy
Source§fn default() -> FsyncPolicy
fn default() -> FsyncPolicy
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for FsyncPolicy
impl<'de> Deserialize<'de> for FsyncPolicy
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
Source§impl Display for FsyncPolicy
impl Display for FsyncPolicy
Source§impl PartialEq for FsyncPolicy
impl PartialEq for FsyncPolicy
Source§impl Serialize for FsyncPolicy
impl Serialize for FsyncPolicy
impl StructuralPartialEq for FsyncPolicy
Auto Trait Implementations§
impl Freeze for FsyncPolicy
impl RefUnwindSafe for FsyncPolicy
impl Send for FsyncPolicy
impl Sync for FsyncPolicy
impl Unpin for FsyncPolicy
impl UnsafeUnpin for FsyncPolicy
impl UnwindSafe for FsyncPolicy
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