#[non_exhaustive]pub struct PushRecipient {
pub filter: Option<DeviceFilter>,
pub fcm_tokens: Vec<String>,
pub fcm_topic: String,
pub fcm_condition: String,
pub hms_tokens: Vec<String>,
pub hms_topic: String,
pub hms_condition: String,
pub apns_tokens: Vec<String>,
pub webpush_tokens: Vec<String>,
}Expand description
PushRecipient describes who receives a push notification. Set only one of its fields. Centrifugo PRO only.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.filter: Option<DeviceFilter>filter sends to devices from Centrifugo device storage that match the
filter.
Not sent when it is empty, as when it is None.
fcm_tokens: Vec<String>fcm_tokens sends to a list of FCM native tokens.
fcm_topic: Stringfcm_topic sends to an FCM native topic.
fcm_condition: Stringfcm_condition sends to an FCM native condition.
hms_tokens: Vec<String>hms_tokens sends to a list of HMS native tokens.
hms_topic: Stringhms_topic sends to an HMS native topic.
hms_condition: Stringhms_condition sends to an HMS native condition.
apns_tokens: Vec<String>apns_tokens sends to a list of APNs native tokens.
webpush_tokens: Vec<String>webpush_tokens sends to a list of raw Web Push subscriptions, each a
PushSubscription JSON string.
Implementations§
Source§impl PushRecipient
impl PushRecipient
Sourcepub fn filter(self, value: DeviceFilter) -> Self
pub fn filter(self, value: DeviceFilter) -> Self
Sets filter.
Sourcepub fn fcm_tokens(
self,
value: impl IntoIterator<Item = impl Into<String>>,
) -> Self
pub fn fcm_tokens( self, value: impl IntoIterator<Item = impl Into<String>>, ) -> Self
Sets fcm_tokens.
Sourcepub fn fcm_condition(self, value: impl Into<String>) -> Self
pub fn fcm_condition(self, value: impl Into<String>) -> Self
Sets fcm_condition.
Sourcepub fn hms_tokens(
self,
value: impl IntoIterator<Item = impl Into<String>>,
) -> Self
pub fn hms_tokens( self, value: impl IntoIterator<Item = impl Into<String>>, ) -> Self
Sets hms_tokens.
Sourcepub fn hms_condition(self, value: impl Into<String>) -> Self
pub fn hms_condition(self, value: impl Into<String>) -> Self
Sets hms_condition.
Sourcepub fn apns_tokens(
self,
value: impl IntoIterator<Item = impl Into<String>>,
) -> Self
pub fn apns_tokens( self, value: impl IntoIterator<Item = impl Into<String>>, ) -> Self
Sets apns_tokens.
Sourcepub fn webpush_tokens(
self,
value: impl IntoIterator<Item = impl Into<String>>,
) -> Self
pub fn webpush_tokens( self, value: impl IntoIterator<Item = impl Into<String>>, ) -> Self
Sets webpush_tokens.