pub trait NotificationService:
Debug
+ Send
+ Sync
+ 'static {
// Required method
fn notify<'life0, 'async_trait>(
&'life0 self,
notification: Notification,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Expand description
Native user notifications.
Implementations must not fail the caller when the user has denied notification permission — a suppressed notification is a normal outcome, not an error.
Required Methods§
fn notify<'life0, 'async_trait>(
&'life0 self,
notification: Notification,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".