Skip to main content

Notifier

Trait Notifier 

Source
pub trait Notifier: Send + Sync {
    // Required methods
    fn send<'life0, 'life1, 'async_trait>(
        &'life0 self,
        event: &'life1 NotificationEvent,
    ) -> Pin<Box<dyn Future<Output = Result<(), NotifyError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn name(&self) -> &str;
}
Expand description

Trait for notification backends

Required Methods§

Source

fn send<'life0, 'life1, 'async_trait>( &'life0 self, event: &'life1 NotificationEvent, ) -> Pin<Box<dyn Future<Output = Result<(), NotifyError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Send a notification event

Source

fn name(&self) -> &str

Get the name of this notifier

Implementors§