pub enum Barrier {
None,
Data,
Full,
}Expand description
Which durability barrier a caller wants. Named rather than boolean,
because true does not say what was promised.
There is deliberately no generic sync() on FileIo. One existed
briefly and called File::sync_data, which issues F_FULLFSYNC on
macOS and fdatasync on Linux – the same call meaning two different
promises depending on the platform, which is exactly the ambiguity
sync_data/sync_full exist to remove. Leaving a sync() beside them
preserves the bug in the one place nobody looks: the buffer pool’s own
checkpoint flush went through it, ungoverned by any SyncMode, even
after Store::commit stopped being ambiguous.
Variants§
Trait Implementations§
impl Copy for Barrier
impl Eq for Barrier
impl StructuralPartialEq for Barrier
Auto Trait Implementations§
impl Freeze for Barrier
impl RefUnwindSafe for Barrier
impl Send for Barrier
impl Sync for Barrier
impl Unpin for Barrier
impl UnsafeUnpin for Barrier
impl UnwindSafe for Barrier
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