pub struct AnomalyDetectionService { /* private fields */ }Implementations§
Source§impl AnomalyDetectionService
impl AnomalyDetectionService
pub fn new() -> Self
pub async fn check_anomaly( &self, metric_name: &str, value: f64, ) -> AnomalyCheckResult
pub async fn record_event(&self, metric_name: &str, value: f64)
pub async fn check_trend_anomaly( &self, metric_name: &str, window_minutes: i64, ) -> Option<AnomalyCheckResult>
pub async fn update_threshold( &self, metric_name: &str, warning: f64, critical: f64, )
pub async fn get_recent_events(&self, metric_name: &str) -> Vec<AnomalyEvent>
Trait Implementations§
Source§impl Clone for AnomalyDetectionService
impl Clone for AnomalyDetectionService
Source§fn clone(&self) -> AnomalyDetectionService
fn clone(&self) -> AnomalyDetectionService
Returns a duplicate of the value. Read more
1.0.0 · 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 AnomalyDetectionService
impl Debug for AnomalyDetectionService
Auto Trait Implementations§
impl Freeze for AnomalyDetectionService
impl !RefUnwindSafe for AnomalyDetectionService
impl Send for AnomalyDetectionService
impl Sync for AnomalyDetectionService
impl Unpin for AnomalyDetectionService
impl !UnwindSafe for AnomalyDetectionService
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more