pub trait Notifier {
// Required method
fn notify<'life0, 'life1, 'async_trait>(
&'life0 self,
message: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
// Provided method
fn notify_with_payload<'life0, 'life1, 'async_trait>(
&'life0 self,
message: &'life1 str,
_payload_fields: HashMap<String, Value>,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait { ... }
}
Expand description
Interface for notification implementations
All notification types must implement this trait to provide consistent notification behavior.