Trait AlertHandler

Source
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§

Source

fn handle_alert(&self, alert: &Alert) -> QuantRS2Result<()>

Handle an alert

Source

fn name(&self) -> &str

Get handler name

Source

fn can_handle(&self, level: AlertLevel) -> bool

Check if handler can handle this alert level

Implementors§