pub struct AlertContext { /* private fields */ }Expand description
Context information for alert conditions
Implementations§
Source§impl AlertContext
impl AlertContext
Sourcepub async fn record_event(&self, timestamp: DateTime<Utc>)
pub async fn record_event(&self, timestamp: DateTime<Utc>)
Record an event timestamp
Sourcepub async fn get_event_rate_async(&self, window_secs: u64) -> f64
pub async fn get_event_rate_async(&self, window_secs: u64) -> f64
Get event rate (async version)
Trait Implementations§
Source§impl Clone for AlertContext
impl Clone for AlertContext
Source§fn clone(&self) -> AlertContext
fn clone(&self) -> AlertContext
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 AlertContext
impl Debug for AlertContext
Source§impl Default for AlertContext
impl Default for AlertContext
Source§fn default() -> AlertContext
fn default() -> AlertContext
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for AlertContext
impl !RefUnwindSafe for AlertContext
impl Send for AlertContext
impl Sync for AlertContext
impl Unpin for AlertContext
impl !UnwindSafe for AlertContext
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