pub struct AnomalyDetector { /* private fields */ }Expand description
Tracks recent tool execution outcomes and detects anomalous patterns.
Implementations§
Source§impl AnomalyDetector
impl AnomalyDetector
pub fn new( window_size: usize, error_threshold: f64, critical_threshold: f64, ) -> Self
Sourcepub fn record_success(&mut self)
pub fn record_success(&mut self)
Record a successful tool execution.
Sourcepub fn record_error(&mut self)
pub fn record_error(&mut self)
Record a failed tool execution.
Sourcepub fn record_blocked(&mut self)
pub fn record_blocked(&mut self)
Record a blocked tool execution.
Trait Implementations§
Source§impl Debug for AnomalyDetector
impl Debug for AnomalyDetector
Auto Trait Implementations§
impl Freeze for AnomalyDetector
impl RefUnwindSafe for AnomalyDetector
impl Send for AnomalyDetector
impl Sync for AnomalyDetector
impl Unpin for AnomalyDetector
impl UnsafeUnpin for AnomalyDetector
impl UnwindSafe for AnomalyDetector
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