pub trait AlertHandler:
Debug
+ Send
+ Sync {
// Required methods
fn handle_alert(&self, alert: &Alert) -> QuantRS2Result<()>;
fn name(&self) -> &str;
fn can_handle(&self, level: AlertLevel) -> bool;
}
Expand description
Alert handler trait
Required Methods§
Sourcefn handle_alert(&self, alert: &Alert) -> QuantRS2Result<()>
fn handle_alert(&self, alert: &Alert) -> QuantRS2Result<()>
Handle an alert
Sourcefn can_handle(&self, level: AlertLevel) -> bool
fn can_handle(&self, level: AlertLevel) -> bool
Check if handler can handle this alert level