pub struct Faults { /* private fields */ }Expand description
The armed set plus the run’s generator.
Implementations§
Source§impl Faults
impl Faults
Sourcepub fn none() -> Faults
pub fn none() -> Faults
Nothing armed but the weather that is always true: Fault::StaleVncPort
is the provider’s normal behaviour, not an exception, and a mock that
hid it by default would leave the toggle cure untested.
Sourcepub fn quiet() -> Faults
pub fn quiet() -> Faults
Nothing at all, not even the provider’s normal. For the one test that asserts the mock can be quiet.
Sourcepub fn seeded(seed: u64) -> Faults
pub fn seeded(seed: u64) -> Faults
Weather derived from one number. Every fault whose
Fault::seeded_rate_per_mille is non-zero is armed, and fires at that
rate off a stream derived from the seed and the fault’s own name — so
adding a tenth fault does not renumber the other nine’s decisions, and a
seed printed today still replays tomorrow.
pub fn seed(&self) -> u64
pub fn arm(&self, f: Fault)
pub fn disarm(&self, f: Fault)
pub fn is_armed(&self, f: Fault) -> bool
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