pub enum AppendFsync {
Always,
EverySec,
No,
}Expand description
AOF fsync policy. Matches Redis appendfsync.
Variants§
Always
fsync after every write command. Zero data-loss but ~50% throughput.
EverySec
Background fsync every second. Lose at most 1s on crash. Default.
No
No explicit fsync; let OS pagecache flush. Lose ~30s on crash.
Implementations§
Source§impl AppendFsync
impl AppendFsync
Sourcepub fn as_str(&self) -> &'static str
pub fn as_str(&self) -> &'static str
Canonical Redis-compatible name (always / everysec / no).
Used by CONFIG GET appendfsync and CONFIG REWRITE.
Sourcepub fn parse(s: &str) -> Option<Self>
pub fn parse(s: &str) -> Option<Self>
Inverse of Self::as_str — case-insensitive. None for any
other input; used by both the TOML parser and CONFIG SET.
Trait Implementations§
Source§impl Clone for AppendFsync
impl Clone for AppendFsync
Source§fn clone(&self) -> AppendFsync
fn clone(&self) -> AppendFsync
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 AppendFsync
Source§impl Debug for AppendFsync
impl Debug for AppendFsync
impl Eq for AppendFsync
Source§impl PartialEq for AppendFsync
impl PartialEq for AppendFsync
Source§fn eq(&self, other: &AppendFsync) -> bool
fn eq(&self, other: &AppendFsync) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for AppendFsync
Auto Trait Implementations§
impl Freeze for AppendFsync
impl RefUnwindSafe for AppendFsync
impl Send for AppendFsync
impl Sync for AppendFsync
impl Unpin for AppendFsync
impl UnsafeUnpin for AppendFsync
impl UnwindSafe for AppendFsync
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