Struct ConsecutiveFailureDetector
pub struct ConsecutiveFailureDetector { /* private fields */ }Expand description
Fires when a named tool has failed threshold consecutive times.
Uses a state-key convention: if bg:{tool_name}_failed is true the
tool is considered to have failed; if false (or absent) the streak
resets.
Implementations§
§impl ConsecutiveFailureDetector
impl ConsecutiveFailureDetector
pub fn new(
tool_name: impl Into<String>,
threshold: u32,
) -> ConsecutiveFailureDetector
pub fn new( tool_name: impl Into<String>, threshold: u32, ) -> ConsecutiveFailureDetector
Create a new consecutive-failure detector.
tool_name: the tool whose failures are tracked.threshold: how many consecutive failures before firing.
Trait Implementations§
§impl PatternDetector for ConsecutiveFailureDetector
impl PatternDetector for ConsecutiveFailureDetector
Auto Trait Implementations§
impl !Freeze for ConsecutiveFailureDetector
impl RefUnwindSafe for ConsecutiveFailureDetector
impl Send for ConsecutiveFailureDetector
impl Sync for ConsecutiveFailureDetector
impl Unpin for ConsecutiveFailureDetector
impl UnwindSafe for ConsecutiveFailureDetector
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