pub trait NotificationSource: Send + Sync {
// Required methods
fn list<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<Notification>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn mark_read<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
// Provided method
fn mark_all_read<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
}Expand description
The provider’s personal notification feed (GitHub notifications, GitLab todos, Linear
notifications). Only some providers have one — see Capabilities::supports_notifications.
Required Methods§
Provided Methods§
Sourcefn mark_all_read<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn mark_all_read<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Mark every notification read. Default: mark each one; providers with a bulk endpoint
(GitHub PUT /notifications, GitLab /todos/mark_as_done) should override.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".