Enum FlushMethod
pub enum FlushMethod {
Fdatasync,
FullFsync,
Fsync,
Dsync,
IoUring,
}Expand description
How a batch is made durable.
Variants§
Fdatasync
fdatasync after the writes.
FullFsync
fcntl(F_FULLFSYNC) after the writes (macOS default). The only call
macOS guarantees reaches stable media.
Fsync
Plain fsync. On macOS this does not flush the drive cache: use
it only for development figures, never for durability claims.
Dsync
Linux: each write carries RWF_DSYNC; no separate flush call (Linux
default, together with LocalOptions::direct_io). Where O_DIRECT
is refused, the log uses buffered writes and fdatasync instead.
IoUring
Linux with the io-uring feature: writes and fdatasync linked in
one submission. Writes are buffered: direct_io does not apply.
Implementations§
§impl FlushMethod
impl FlushMethod
pub fn platform_default() -> Self
Trait Implementations§
§impl Clone for FlushMethod
impl Clone for FlushMethod
§fn clone(&self) -> FlushMethod
fn clone(&self) -> FlushMethod
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 more§impl Debug for FlushMethod
impl Debug for FlushMethod
§impl PartialEq for FlushMethod
impl PartialEq for FlushMethod
impl Copy for FlushMethod
impl Eq for FlushMethod
impl StructuralPartialEq for FlushMethod
Auto Trait Implementations§
impl Freeze for FlushMethod
impl RefUnwindSafe for FlushMethod
impl Send for FlushMethod
impl Sync for FlushMethod
impl Unpin for FlushMethod
impl UnsafeUnpin for FlushMethod
impl UnwindSafe for FlushMethod
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