pub trait Notification: Send + Sync {
// Required method
fn channels(&self) -> Vec<Channel>;
// Provided methods
fn to_mail<'life0, 'life1, 'async_trait>(
&'life0 self,
_container: &'life1 Container,
) -> Pin<Box<dyn Future<Output = Result<Option<OutgoingMessage>, Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait { ... }
fn to_database<'life0, 'life1, 'async_trait>(
&'life0 self,
_container: &'life1 Container,
) -> Pin<Box<dyn Future<Output = Result<Option<Value>, Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait { ... }
fn to_slack<'life0, 'life1, 'async_trait>(
&'life0 self,
_container: &'life1 Container,
) -> Pin<Box<dyn Future<Output = Result<Option<SlackMessage>, Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait { ... }
}Required Methods§
Provided Methods§
fn to_mail<'life0, 'life1, 'async_trait>(
&'life0 self,
_container: &'life1 Container,
) -> Pin<Box<dyn Future<Output = Result<Option<OutgoingMessage>, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn to_database<'life0, 'life1, 'async_trait>(
&'life0 self,
_container: &'life1 Container,
) -> Pin<Box<dyn Future<Output = Result<Option<Value>, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn to_slack<'life0, 'life1, 'async_trait>(
&'life0 self,
_container: &'life1 Container,
) -> Pin<Box<dyn Future<Output = Result<Option<SlackMessage>, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".