Skip to main content

NotificationWriter

Trait NotificationWriter 

Source
pub trait NotificationWriter: NotificationReader {
    // Required methods
    fn insert_notification<'life0, 'async_trait>(
        &'life0 self,
        input: NewNotificationInput,
    ) -> Pin<Box<dyn Future<Output = Result<NotificationRecord>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn mark_notifications_read<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        wallet: &'life1 str,
        ids: &'life2 [i64],
        now: DateTime<Utc>,
    ) -> Pin<Box<dyn Future<Output = Result<usize>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
    fn mark_all_notifications_read<'life0, 'life1, 'async_trait>(
        &'life0 self,
        wallet: &'life1 str,
        now: DateTime<Utc>,
    ) -> Pin<Box<dyn Future<Output = Result<usize>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}
Expand description

Write operations for the notification feed.

Required Methods§

Source

fn insert_notification<'life0, 'async_trait>( &'life0 self, input: NewNotificationInput, ) -> Pin<Box<dyn Future<Output = Result<NotificationRecord>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Insert a new notification, returning the inserted row.

Source

fn mark_notifications_read<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, wallet: &'life1 str, ids: &'life2 [i64], now: DateTime<Utc>, ) -> Pin<Box<dyn Future<Output = Result<usize>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Mark specific notification ids as read for a wallet. Returns the number of rows updated.

Source

fn mark_all_notifications_read<'life0, 'life1, 'async_trait>( &'life0 self, wallet: &'life1 str, now: DateTime<Utc>, ) -> Pin<Box<dyn Future<Output = Result<usize>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Mark all unread notifications as read for a wallet. Returns the number of rows updated.

Implementors§