pub struct Faults {
pub skip_blob_fsync: bool,
pub die_between_fsyncs: bool,
}Expand description
Injected faults, so the crash-ordering guard exercises the real append
rather than a hand-rolled twin of it (LAW 5: one writer, not two copies that
a guard then watches agree).
Never set outside a test. SafeWriter::create leaves both clear.
Fields§
§skip_blob_fsync: boolSkip step (2), the blob fsync.
die_between_fsyncs: boolStop after step (2) and before step (3) — the exact on-disk state a
machine that dies between the two fsyncs leaves behind. append returns
Err because a Rust function has to return something; a real crash
simply would not return, and the bytes on the platter are identical
either way, which is what the guard asserts on.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Faults
impl RefUnwindSafe for Faults
impl Send for Faults
impl Sync for Faults
impl Unpin for Faults
impl UnsafeUnpin for Faults
impl UnwindSafe for Faults
Blanket Implementations§
impl<T> Allocation for T
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