Struct apns2::Notification
[−]
[src]
pub struct Notification { pub topic: String, pub device_token: String, pub payload: Payload, pub id: Option<Uuid>, pub expiration: Option<u64>, pub priority: Option<Priority>, pub collapse_id: Option<CollapseId>, }
A notification struct contains all relevant data for a notification request sent to the APNS API. This includes other options not contained in the payload. These options are transferred with HTTP request headers.
Fields
topic: String
The topic to use. Usually the app bundle id.
device_token: String
payload: Payload
id: Option<Uuid>
Optional id identifying the message.
expiration: Option<u64>
Optional expiration time as UNIX timestamp.
priority: Option<Priority>
Priority for the notification.
collapse_id: Option<CollapseId>
Methods
impl Notification
[src]
fn new(topic: String, device_token: String, payload: Payload) -> Self
[src]
Create a new notification.
Trait Implementations
impl Clone for Notification
[src]
fn clone(&self) -> Notification
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more