pub struct WebpushNotification {
pub title: Option<String>,
pub body: Option<String>,
pub icon: Option<String>,
pub extra: Map<String, Value>,
}Expand description
A Web Push display notification, following the Web Notifications API
(https://developer.mozilla.org/docs/Web/API/Notification) — the shape
FCM forwards verbatim as webpush.notification to the browser’s push
event, distinct from Notification’s cross-platform title/body/image.
Fields§
§title: Option<String>The notification’s title.
body: Option<String>The notification’s body text.
icon: Option<String>A URL to an icon to display in the notification.
extra: Map<String, Value>Any additional Web Notification fields not covered above (e.g.
badge, image, actions, vibrate, tag), merged directly into
the wire-format webpush.notification object.
Trait Implementations§
Source§impl Clone for WebpushNotification
impl Clone for WebpushNotification
Source§fn clone(&self) -> WebpushNotification
fn clone(&self) -> WebpushNotification
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 Debug for WebpushNotification
impl Debug for WebpushNotification
Source§impl Default for WebpushNotification
impl Default for WebpushNotification
Source§fn default() -> WebpushNotification
fn default() -> WebpushNotification
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for WebpushNotification
impl RefUnwindSafe for WebpushNotification
impl Send for WebpushNotification
impl Sync for WebpushNotification
impl Unpin for WebpushNotification
impl UnsafeUnpin for WebpushNotification
impl UnwindSafe for WebpushNotification
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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