pub struct AnomalyDetector { /* private fields */ }Expand description
Anomaly detector
Implementations§
Source§impl AnomalyDetector
impl AnomalyDetector
pub fn new() -> Self
pub fn initialize(&mut self) -> Result<(), CryptographicError>
Sourcepub fn detection_algorithms(&self) -> &[AnomalyDetectionAlgorithm]
pub fn detection_algorithms(&self) -> &[AnomalyDetectionAlgorithm]
Get the configured detection algorithms.
Sourcepub fn add_detection_algorithm(&mut self, algorithm: AnomalyDetectionAlgorithm)
pub fn add_detection_algorithm(&mut self, algorithm: AnomalyDetectionAlgorithm)
Add a detection algorithm if not already present.
Sourcepub fn add_baseline_model(&mut self, model: BaselineModel)
pub fn add_baseline_model(&mut self, model: BaselineModel)
Register a baseline model.
Sourcepub fn get_baseline_model(&self, model_id: &str) -> Option<&BaselineModel>
pub fn get_baseline_model(&self, model_id: &str) -> Option<&BaselineModel>
Look up a baseline model by id.
Sourcepub fn list_baseline_models(&self) -> impl Iterator<Item = &BaselineModel>
pub fn list_baseline_models(&self) -> impl Iterator<Item = &BaselineModel>
Iterate over all registered baseline models.
Sourcepub fn set_alert_threshold(&mut self, metric: String, threshold: f64)
pub fn set_alert_threshold(&mut self, metric: String, threshold: f64)
Set an alert threshold for a named metric.
Sourcepub fn get_alert_threshold(&self, metric: &str) -> Option<f64>
pub fn get_alert_threshold(&self, metric: &str) -> Option<f64>
Look up an alert threshold by metric name.
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§
§impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
Aggregate shares in an MPC protocol.
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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