pub struct FcmMessage { /* private fields */ }Expand description
Represents an FCM message with all supported fields.
Implementations§
Source§impl FcmMessage
impl FcmMessage
Sourcepub fn set_data(&mut self, data: Option<HashMap<String, String>>)
pub fn set_data(&mut self, data: Option<HashMap<String, String>>)
Sets custom data key-value pairs.
Sourcepub fn set_notification(&mut self, notification: Option<FcmNotification>)
pub fn set_notification(&mut self, notification: Option<FcmNotification>)
Sets the notification content.
Sourcepub fn set_android(&mut self, android: Option<AndroidConfig>)
pub fn set_android(&mut self, android: Option<AndroidConfig>)
Sets Android-specific configuration.
Sourcepub fn set_webpush(&mut self, webpush: Option<WebpushConfig>)
pub fn set_webpush(&mut self, webpush: Option<WebpushConfig>)
Sets Webpush-specific configuration.
Sourcepub fn set_apns(&mut self, apns: Option<ApnsConfig>)
pub fn set_apns(&mut self, apns: Option<ApnsConfig>)
Sets APNs-specific configuration.
Sourcepub fn set_fcm_options(&mut self, fcm_options: Option<FcmOptions>)
pub fn set_fcm_options(&mut self, fcm_options: Option<FcmOptions>)
Sets FCM options.
Sourcepub fn set_target(&mut self, target: Target)
pub fn set_target(&mut self, target: Target)
Sets the message target (token, topic, or condition).
pub fn name(&self) -> Option<&String>
pub fn data(&self) -> Option<&HashMap<String, String, RandomState>>
pub fn notification(&self) -> Option<&FcmNotification>
pub fn android(&self) -> Option<&AndroidConfig>
pub fn webpush(&self) -> Option<&WebpushConfig>
pub fn apns(&self) -> Option<&ApnsConfig>
pub fn fcm_options(&self) -> Option<&FcmOptions>
pub fn target(&self) -> &Target
Trait Implementations§
Source§impl Clone for FcmMessage
impl Clone for FcmMessage
Source§fn clone(&self) -> FcmMessage
fn clone(&self) -> FcmMessage
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 FcmMessage
impl Debug for FcmMessage
Source§impl Default for FcmMessage
impl Default for FcmMessage
Source§fn default() -> FcmMessage
fn default() -> FcmMessage
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for FcmMessage
impl<'de> Deserialize<'de> for FcmMessage
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 FcmMessage
impl RefUnwindSafe for FcmMessage
impl Send for FcmMessage
impl Sync for FcmMessage
impl Unpin for FcmMessage
impl UnwindSafe for FcmMessage
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