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§
Sourcefn send(&self, alert: &Alert) -> DeviceResult<()>
fn send(&self, alert: &Alert) -> DeviceResult<()>
Send notification
Sourcefn is_enabled(&self) -> bool
fn is_enabled(&self) -> bool
Check if channel is enabled