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 fn with_guarded_client(self, client: GuardedClient) -> Self
pub fn with_guarded_client(self, client: GuardedClient) -> Self
Sends ticket requests and immediate or deferred receipt requests through client.
The client’s policy, timeouts and response limits apply. Configure its
request timeout explicitly if it should match PushOptions::request_timeout.
Sourcepub const fn options(&self) -> &PushOptions
pub const fn options(&self) -> &PushOptions
Returns the options this sender was built from.