pub struct Faults { /* private fields */ }Expand description
When the fault-injecting fake fails. Counts replace attempts on one Store: each replace and
each begin_replace that passes the declared-needs check and reaches the backend, whether or
not the backend then succeeds.
Implementations§
Source§impl Faults
impl Faults
Sourcepub fn fail_writes_after(n: usize) -> Self
pub fn fail_writes_after(n: usize) -> Self
The first n replace attempts proceed; every later one fails with Error::Injected, at
replace or at begin_replace.
Sourcepub fn interrupt_writes_after(n: usize) -> Self
pub fn interrupt_writes_after(n: usize) -> Self
As Faults::fail_writes_after, but a failing attempt first writes half of each piece it
is given (rounded up, so a one-byte value is written whole; an empty one has nothing to
write) and then fails at commit without committing, as a crash would.
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§
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