pub struct ExpoPushSender { /* private fields */ }Expand description
Expo push adapter.
Expo answers /push/send with one ticket per notification. A ticket only
says Expo accepted the notification; delivery is confirmed later through
/push/getReceipts. This adapter runs both phases per batch, so one
PushSender::send call returns settled outcomes wherever Expo has them and
PushDeliveryStatus::Accepted for the receipts that are not ready yet.
Cloning is cheap; the inner reqwest client shares its connection pool.
Implementations§
Source§impl ExpoPushSender
impl ExpoPushSender
Sourcepub fn new() -> Result<Self, PushOptionsError>
pub fn new() -> Result<Self, PushOptionsError>
Builds a sender against the public Expo API with default options.
Sourcepub fn with_options(options: PushOptions) -> Result<Self, PushOptionsError>
pub fn with_options(options: PushOptions) -> Result<Self, PushOptionsError>
Builds a sender from validated options.
Sourcepub const fn options(&self) -> &PushOptions
pub const fn options(&self) -> &PushOptions
Returns the options this sender was built from.
Trait Implementations§
Source§impl Clone for ExpoPushSender
impl Clone for ExpoPushSender
Source§fn clone(&self) -> ExpoPushSender
fn clone(&self) -> ExpoPushSender
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ExpoPushSender
impl Debug for ExpoPushSender
Source§impl PushSender for ExpoPushSender
impl PushSender for ExpoPushSender
Source§fn send<'a>(&'a self, batch: Vec<PushMessage>) -> PushFuture<'a>
fn send<'a>(&'a self, batch: Vec<PushMessage>) -> PushFuture<'a>
Delivers a batch of notifications and reports the outcome of each.
Auto Trait Implementations§
impl !RefUnwindSafe for ExpoPushSender
impl !UnwindSafe for ExpoPushSender
impl Freeze for ExpoPushSender
impl Send for ExpoPushSender
impl Sync for ExpoPushSender
impl Unpin for ExpoPushSender
impl UnsafeUnpin for ExpoPushSender
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