Skip to main content

PushSubscriptionWriter

Trait PushSubscriptionWriter 

Source
pub trait PushSubscriptionWriter: PushSubscriptionReader {
    // Required methods
    fn upsert_push_subscription<'life0, 'async_trait>(
        &'life0 self,
        input: UpsertPushSubscriptionInput,
    ) -> Pin<Box<dyn Future<Output = Result<PushSubscriptionRecord>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn update_push_preferences<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        wallet: &'life1 str,
        endpoint: &'life2 str,
        preferences: Value,
    ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
    fn delete_push_subscription<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        wallet: &'life1 str,
        endpoint: &'life2 str,
    ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
    fn delete_push_subscription_by_id<'life0, 'async_trait>(
        &'life0 self,
        id: i64,
    ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

Write operations for push subscriptions.

Required Methods§

Source

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

Upsert a push subscription (insert or update on conflict). On conflict (wallet_address, endpoint), updates auth_key, p256dh_key, and preferences.

Source

fn update_push_preferences<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, wallet: &'life1 str, endpoint: &'life2 str, preferences: Value, ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Update preferences for an existing subscription. Returns true if a row was updated.

Source

fn delete_push_subscription<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, wallet: &'life1 str, endpoint: &'life2 str, ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Delete a push subscription by wallet + endpoint. Returns true if a row was deleted.

Source

fn delete_push_subscription_by_id<'life0, 'async_trait>( &'life0 self, id: i64, ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Delete a push subscription by id.

Implementors§