NotificationChannel

Trait NotificationChannel 

Source
pub trait NotificationChannel: Debug {
    // Required methods
    fn send_notification<'life0, 'life1, 'async_trait>(
        &'life0 self,
        alert: &'life1 Alert,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn get_channel_type(&self) -> String;
    fn is_available(&self) -> bool;
}
Expand description

Trait for notification channels

Required Methods§

Source

fn send_notification<'life0, 'life1, 'async_trait>( &'life0 self, alert: &'life1 Alert, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn get_channel_type(&self) -> String

Source

fn is_available(&self) -> bool

Implementors§