Skip to main content

Push

Trait Push 

Source
pub trait Push: Send + Sync {
    // Required method
    fn send<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        device_token: &'life1 str,
        notification: &'life2 Notification,
    ) -> Pin<Box<dyn Future<Output = Result<PushOutcome, PushError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
}
Expand description

Sends notifications to a device. APNs today, FCM later; both over the runtime’s HttpClient.

Required Methods§

Source

fn send<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, device_token: &'life1 str, notification: &'life2 Notification, ) -> Pin<Box<dyn Future<Output = Result<PushOutcome, PushError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Sends notification to device_token.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§