pub enum Durability {
Async,
Sync,
}Expand description
How aggressively to push WAL writes to durable storage before acknowledging the client.
The default Async flushes to the kernel page cache
and returns immediately; the background sync thread calls fsync within
~1 second. Journal-mode filesystems (ext4, APFS, NTFS) typically absorb a
power loss within that window.
Sync calls fsync before returning, confirming the
data is on stable media. Use this when every write must survive an immediate
power failure, at the cost of higher write latency.
Variants§
Implementations§
Trait Implementations§
Source§impl Clone for Durability
impl Clone for Durability
Source§fn clone(&self) -> Durability
fn clone(&self) -> Durability
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 moreimpl Copy for Durability
Source§impl Debug for Durability
impl Debug for Durability
impl Eq for Durability
Source§impl FromStr for Durability
impl FromStr for Durability
Source§impl PartialEq for Durability
impl PartialEq for Durability
Source§fn eq(&self, other: &Durability) -> bool
fn eq(&self, other: &Durability) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for Durability
Auto Trait Implementations§
impl Freeze for Durability
impl RefUnwindSafe for Durability
impl Send for Durability
impl Sync for Durability
impl Unpin for Durability
impl UnsafeUnpin for Durability
impl UnwindSafe for Durability
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