pub struct Notification<'a> {
pub topic: &'a str,
pub device_token: &'a str,
pub payload: Payload<'a>,
pub id: Option<Uuid>,
pub expiration: Option<u64>,
pub priority: Option<Priority>,
pub collapse_id: Option<CollapseId>,
pub apns_push_type: Option<ApnsPushType>,
}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: &'a strThe topic to use. Usually the app bundle id.
device_token: &'a str§payload: Payload<'a>§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>§apns_push_type: Option<ApnsPushType>Implementations§
Trait Implementations§
Source§impl<'a> Clone for Notification<'a>
impl<'a> Clone for Notification<'a>
Source§fn clone(&self) -> Notification<'a>
fn clone(&self) -> Notification<'a>
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<'a> Debug for Notification<'a>
impl<'a> Debug for Notification<'a>
Auto Trait Implementations§
impl<'a> Freeze for Notification<'a>
impl<'a> RefUnwindSafe for Notification<'a>
impl<'a> Send for Notification<'a>
impl<'a> Sync for Notification<'a>
impl<'a> Unpin for Notification<'a>
impl<'a> UnsafeUnpin for Notification<'a>
impl<'a> UnwindSafe for Notification<'a>
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