Skip to main content

Push

Trait Push 

Source
pub trait Push: Send + Sync {
    // Required method
    fn send<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        to: &'life1 Recipient,
        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, over whichever transport the Recipient names. An adapter serves one transport and returns PushError::unsupported_recipient for the rest; RoutingPush fans a mixed set of recipients out across the adapters a venture configured.

Required Methods§

Source

fn send<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, to: &'life1 Recipient, 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 to.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§