pub enum FsyncPolicy {
Always,
Periodic(Duration),
Never,
}Expand description
Fsync policy determines when a native WAL is flushed to disk.
Defined at the crate root (not in the native-only writer module) because it
is part of the schema-agnostic substrate surface forgedb-storage re-exports
and generated code names (FsyncPolicy::Always) — it must exist on both
the native and the wasm32 follower target. On wasm32 there is no file WAL
(see the in-memory WalManager below), so the policy is inert there.
Variants§
Always
Fsync after every write (maximum durability, slower).
Periodic(Duration)
Fsync periodically based on elapsed time.
Never
Never fsync automatically (fastest, less durable — must call flush manually).
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 moreimpl Copy for FsyncPolicy
Source§impl Debug for FsyncPolicy
impl Debug for FsyncPolicy
impl Eq for FsyncPolicy
Source§impl PartialEq for FsyncPolicy
impl PartialEq 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