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.
As a PushReceiptSource it reads those receipts later, up to
MAX_RECEIPT_BATCH_SIZE IDs per request.
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§impl Debug for ExpoPushSender
impl Debug for ExpoPushSender
Source§impl PushReceiptSource for ExpoPushSender
impl PushReceiptSource for ExpoPushSender
Source§fn receipts<'a>(&'a self, tickets: Vec<PushTicketId>) -> PushReceiptFuture<'a>
fn receipts<'a>(&'a self, tickets: Vec<PushTicketId>) -> PushReceiptFuture<'a>
Fetches the settled receipts for the given tickets. Read more
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