pub struct NotificationBuilder<'a> { /* private fields */ }Expand description
A builder for convenient construction of notifications.
Implementations§
Source§impl<'a> NotificationBuilder<'a>
impl<'a> NotificationBuilder<'a>
pub fn new(topic: &'a str, device_id: &'a str) -> Self
pub fn push_type(self, push_type: ApnsPushType) -> Self
pub fn payload(self, payload: Payload<'a>) -> Self
pub fn alert(self, alert: &'a str) -> Self
pub fn title(self, title: &'a str) -> Self
pub fn body(self, body: &'a str) -> Self
pub fn badge(self, number: u32) -> Self
pub fn sound(self, sound: &'a str) -> Self
pub fn content_available(self) -> Self
pub fn category(self, category: &'a str) -> Self
pub fn thread_id(self, thread_id: &'a str) -> Self
pub fn id(self, id: Uuid) -> Self
pub fn expiration(self, expiration: u64) -> Self
pub fn priority(self, priority: Priority) -> Self
pub fn collapse_id(self, id: CollapseId) -> Self
pub fn build(self) -> Notification<'a>
Auto Trait Implementations§
impl<'a> Freeze for NotificationBuilder<'a>
impl<'a> RefUnwindSafe for NotificationBuilder<'a>
impl<'a> Send for NotificationBuilder<'a>
impl<'a> Sync for NotificationBuilder<'a>
impl<'a> Unpin for NotificationBuilder<'a>
impl<'a> UnsafeUnpin for NotificationBuilder<'a>
impl<'a> UnwindSafe for NotificationBuilder<'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