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§impl Debug for AlertContext
impl Debug for AlertContext
Auto Trait Implementations§
impl !RefUnwindSafe for AlertContext
impl !UnwindSafe for AlertContext
impl Freeze for AlertContext
impl Send for AlertContext
impl Sync for AlertContext
impl Unpin for AlertContext
impl UnsafeUnpin 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