pub trait NotificationChannel: Send + Sync {
// Required methods
fn kind(&self) -> &'static str;
fn label(&self) -> &'static str;
fn config_fields(&self) -> Vec<ConfigField>;
fn deliver<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
d: &'life1 Delivery<'life2>,
msg: &'life3 Notification,
) -> Pin<Box<dyn Future<Output = Result<(), DeliverError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait;
// Provided method
fn help(&self) -> &'static str { ... }
}Expand description
A destination kind. Implement it, register it, and it appears in the admin’s channel picker with its own settings.
Required Methods§
Sourcefn kind(&self) -> &'static str
fn kind(&self) -> &'static str
Stable key stored on the target row ("slack"). Changing it
orphans existing targets, so treat it as data, not a label.
fn config_fields(&self) -> Vec<ConfigField>
fn deliver<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
d: &'life1 Delivery<'life2>,
msg: &'life3 Notification,
) -> Pin<Box<dyn Future<Output = Result<(), DeliverError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Provided Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".