pub trait DatabaseNotificationStore: Send + Sync {
// Required methods
fn store<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
notifiable_id: &'life1 str,
notifiable_type: &'life2 str,
notification_type: &'life3 str,
message: &'life4 DatabaseMessage,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
Self: 'async_trait;
fn mark_as_read<'life0, 'life1, 'async_trait>(
&'life0 self,
notification_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait;
fn unread<'life0, 'life1, 'async_trait>(
&'life0 self,
notifiable_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<StoredNotification>, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait;
}Expand description
Extension trait for database notification storage.
Required Methods§
Sourcefn store<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
notifiable_id: &'life1 str,
notifiable_type: &'life2 str,
notification_type: &'life3 str,
message: &'life4 DatabaseMessage,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
Self: 'async_trait,
fn store<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
notifiable_id: &'life1 str,
notifiable_type: &'life2 str,
notification_type: &'life3 str,
message: &'life4 DatabaseMessage,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
Self: 'async_trait,
Store a notification in the database.