pub trait AlertSink: Send + Sync {
// Required methods
fn name(&self) -> &str;
fn send(&self, alert: &Alert) -> Result<()>;
// Provided methods
fn flush(&self) -> Result<()> { ... }
fn handles_tags(&self) -> &[String] { ... }
}Expand description
Trait for alert output sinks
Implement this trait to create custom alert destinations.
CLI-specific sinks (like ConsoleSink) should be implemented in shape-cli.
Required Methods§
Provided Methods§
Get the tags this sink handles
Returns an empty slice to handle all alerts.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".