pub struct FaultConfig {
pub command: String,
pub fault_type: FaultType,
pub trigger_count: u64,
pub max_triggers: u64,
pub created_at: Instant,
}Expand description
Configuration for a single fault injection rule.
Fields§
§command: StringTarget command name.
fault_type: FaultTypeType of fault to inject.
trigger_count: u64Number of times this fault has been triggered.
max_triggers: u64Maximum number of times to trigger (0 = unlimited).
created_at: InstantWhen this fault was created.
Implementations§
Source§impl FaultConfig
impl FaultConfig
Sourcepub fn should_trigger(&self) -> bool
pub fn should_trigger(&self) -> bool
Check if this fault should still trigger (based on max_triggers).
Trait Implementations§
Source§impl Clone for FaultConfig
impl Clone for FaultConfig
Source§fn clone(&self) -> FaultConfig
fn clone(&self) -> FaultConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for FaultConfig
impl Debug for FaultConfig
Auto Trait Implementations§
impl Freeze for FaultConfig
impl RefUnwindSafe for FaultConfig
impl Send for FaultConfig
impl Sync for FaultConfig
impl Unpin for FaultConfig
impl UnsafeUnpin for FaultConfig
impl UnwindSafe for FaultConfig
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