pub struct AlertSystem { /* private fields */ }Expand description
Alert system
Implementations§
Source§impl AlertSystem
impl AlertSystem
pub fn new() -> Self
pub fn initialize(&mut self) -> Result<(), StatisticalError>
Sourcepub fn alert_types(&self) -> &[AlertType]
pub fn alert_types(&self) -> &[AlertType]
Returns the list of registered alert types.
Sourcepub fn add_alert_type(&mut self, alert_type: AlertType)
pub fn add_alert_type(&mut self, alert_type: AlertType)
Register an additional alert type if not already present.
Sourcepub fn notification_channels(&self) -> &[NotificationChannel]
pub fn notification_channels(&self) -> &[NotificationChannel]
Returns the list of registered notification channels.
Sourcepub fn add_notification_channel(&mut self, channel: NotificationChannel)
pub fn add_notification_channel(&mut self, channel: NotificationChannel)
Register an additional notification channel if not already present.
Sourcepub fn add_escalation_policy(&mut self, policy: EscalationPolicy)
pub fn add_escalation_policy(&mut self, policy: EscalationPolicy)
Register an escalation policy.
Sourcepub fn escalation_policies(&self) -> &[EscalationPolicy]
pub fn escalation_policies(&self) -> &[EscalationPolicy]
Returns the list of registered escalation policies.
Sourcepub fn get_escalation_policy(
&self,
policy_id: &str,
) -> Option<&EscalationPolicy>
pub fn get_escalation_policy( &self, policy_id: &str, ) -> Option<&EscalationPolicy>
Look up an escalation policy by id.
Sourcepub fn escalation_policy_count(&self) -> usize
pub fn escalation_policy_count(&self) -> usize
Returns the number of registered escalation policies.
Auto Trait Implementations§
impl Freeze for AlertSystem
impl RefUnwindSafe for AlertSystem
impl Send for AlertSystem
impl Sync for AlertSystem
impl Unpin for AlertSystem
impl UnsafeUnpin for AlertSystem
impl UnwindSafe for AlertSystem
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