pub trait AlertHook: Send + Sync {
// Required method
fn notify(&self, alert: &Alert) -> Result<(), String>;
}Expand description
Alert dispatch hook. Implementations can write alerts to logs, send them to a webhook, push them to IM, etc.
Must implement Send + Sync so it can be shared as Arc<dyn AlertHook> in multi-threaded
environments.
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".