pub trait Sender: Send + Sync {
// Required methods
fn name(&self) -> &str;
fn send<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
recipient: &'life1 str,
notif: &'life2 Notification,
) -> Pin<Box<dyn Future<Output = Result<(), NotifyError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
}Expand description
A transport. The name is the channel key callers dispatch to
("telegram", "email", "log", …).
Required Methods§
fn name(&self) -> &str
Sourcefn send<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
recipient: &'life1 str,
notif: &'life2 Notification,
) -> Pin<Box<dyn Future<Output = Result<(), NotifyError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn send<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
recipient: &'life1 str,
notif: &'life2 Notification,
) -> Pin<Box<dyn Future<Output = Result<(), NotifyError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Deliver notif to recipient (chat id / email address / webhook …).
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".