pub trait NotificationChannel: Debug {
// Required methods
fn send_notification<'life0, 'life1, 'async_trait>(
&'life0 self,
alert: &'life1 AlertNotification,
) -> 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§
fn send_notification<'life0, 'life1, 'async_trait>(
&'life0 self,
alert: &'life1 AlertNotification,
) -> 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
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".