Skip to main content

AlertHandler

pub trait AlertHandler: Send + Sync {
    // Required methods
    fn handle_alert(&self, alert: &ResourceAlert) -> Result<(), String>;
    fn priority(&self) -> u32;
    fn can_handle(&self, alert: &ResourceAlert) -> bool;
}
Expand description

Trait for handling resource alerts

Required Methods§

Source

fn handle_alert(&self, alert: &ResourceAlert) -> Result<(), String>

Handles a resource alert

Source

fn priority(&self) -> u32

Gets handler priority (lower number = higher priority)

Source

fn can_handle(&self, alert: &ResourceAlert) -> bool

Checks if this handler can handle the given alert

Implementors§