NotificationChannel

Trait NotificationChannel 

Source
pub trait NotificationChannel: Send + Sync {
    // Required methods
    fn send(&self, alert: &Alert) -> DeviceResult<()>;
    fn name(&self) -> &str;
    fn is_enabled(&self) -> bool;
}
Expand description

Notification channel trait

Required Methods§

Source

fn send(&self, alert: &Alert) -> DeviceResult<()>

Send notification

Source

fn name(&self) -> &str

Get channel name

Source

fn is_enabled(&self) -> bool

Check if channel is enabled

Implementors§