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>,
}
Expand description
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>
Implementations§
Trait Implementations§
Source§impl Clone for Notification
impl Clone for Notification
Source§fn clone(&self) -> Notification
fn clone(&self) -> Notification
Returns a copy of the value. Read more
1.0.0 · 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 Notification
impl Debug for Notification
Source§impl<'de> Deserialize<'de> for Notification
impl<'de> Deserialize<'de> for Notification
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for Notification
impl RefUnwindSafe for Notification
impl Send for Notification
impl Sync for Notification
impl Unpin for Notification
impl UnwindSafe for Notification
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