pub struct FaultEntry { /* private fields */ }Expand description
A fault injection point that can be triggered during testing.
Faults can be enabled/disabled and can be forced to trigger a specific number of times using the pending trips mechanism.
Implementations§
Source§impl FaultEntry
impl FaultEntry
Sourcepub fn set_pending(&self, count: u32)
pub fn set_pending(&self, count: u32)
Sets the number of pending forced trips.
When pending trips are set, the next count calls to trip
will return true regardless of random chance.
Sourcepub fn count_pending(&self) -> u32
pub fn count_pending(&self) -> u32
Returns the number of pending forced trips remaining.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for FaultEntry
impl RefUnwindSafe for FaultEntry
impl Send for FaultEntry
impl Sync for FaultEntry
impl Unpin for FaultEntry
impl UnwindSafe for FaultEntry
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