pub struct RoutingPush { /* private fields */ }Expand description
Dispatches by Recipient variant to the adapter a venture configured
for that transport, so venture code holds one Arc<dyn Push> and never
matches on the transport itself (ADR 0015).
A recipient whose transport has no adapter is
PushOutcome::NotConfigured — the same answer an unconfigured adapter
gives, and deliberately not PushError::Rejected: nothing is wrong with
the recipient, the venture simply did not wire that transport.
Implementations§
Source§impl RoutingPush
impl RoutingPush
Sourcepub fn apns(self, push: Arc<dyn Push>) -> Self
pub fn apns(self, push: Arc<dyn Push>) -> Self
The adapter for Recipient::Apns.
Sourcepub fn fcm(self, push: Arc<dyn Push>) -> Self
pub fn fcm(self, push: Arc<dyn Push>) -> Self
The adapter for Recipient::Fcm.
Sourcepub fn web_push(self, push: Arc<dyn Push>) -> Self
pub fn web_push(self, push: Arc<dyn Push>) -> Self
The adapter for Recipient::WebPush.
Trait Implementations§
Source§impl Clone for RoutingPush
impl Clone for RoutingPush
Source§impl Debug for RoutingPush
impl Debug for RoutingPush
Source§impl Default for RoutingPush
impl Default for RoutingPush
Source§impl Push for RoutingPush
impl Push for RoutingPush
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,
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.Auto Trait Implementations§
impl !RefUnwindSafe for RoutingPush
impl !UnwindSafe for RoutingPush
impl Freeze for RoutingPush
impl Send for RoutingPush
impl Sync for RoutingPush
impl Unpin for RoutingPush
impl UnsafeUnpin for RoutingPush
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more