pub enum AlertAction {
Log {
level: String,
},
Email {
recipients: Vec<String>,
},
Webhook {
url: String,
payload_template: String,
},
BlockIp {
duration: Duration,
},
DisableUser {
user_id: String,
},
RateLimit {
user_id: String,
limit: u32,
duration: Duration,
},
}
Expand description
Actions to take when alert is triggered
Variants§
Log
Log the alert
Send email notification
Webhook
Send webhook notification
BlockIp
Block IP address
DisableUser
Disable user
RateLimit
Rate limit user
Trait Implementations§
Source§impl Clone for AlertAction
impl Clone for AlertAction
Source§fn clone(&self) -> AlertAction
fn clone(&self) -> AlertAction
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 AlertAction
impl Debug for AlertAction
Source§impl<'de> Deserialize<'de> for AlertAction
impl<'de> Deserialize<'de> for AlertAction
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for AlertAction
impl RefUnwindSafe for AlertAction
impl Send for AlertAction
impl Sync for AlertAction
impl Unpin for AlertAction
impl UnwindSafe for AlertAction
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