pub trait NotifyBackend: Send + Sync {
// Required methods
fn name(&self) -> &'static str;
fn send<'life0, 'life1, 'async_trait>(
&'life0 self,
event: &'life1 NotifyEvent,
) -> Pin<Box<dyn Future<Output = Result<(), NotifyError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
}Expand description
A pluggable notification channel.
Required Methods§
Sourcefn send<'life0, 'life1, 'async_trait>(
&'life0 self,
event: &'life1 NotifyEvent,
) -> Pin<Box<dyn Future<Output = Result<(), NotifyError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn send<'life0, 'life1, 'async_trait>(
&'life0 self,
event: &'life1 NotifyEvent,
) -> Pin<Box<dyn Future<Output = Result<(), NotifyError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Delivers event. Failure is always non-fatal to the caller — see the
module docs — but it is no longer thrown away: NotifyJob retries it
unless the NotifyError says the attempt could never have worked.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".