#[non_exhaustive]pub struct DeviceTopicFilter {
pub device_ids: Vec<String>,
pub device_providers: Vec<String>,
pub device_platforms: Vec<String>,
pub device_users: Vec<String>,
pub topics: Vec<String>,
pub topic_prefix: String,
}Expand description
DeviceTopicFilter selects device topic subscriptions. Centrifugo PRO only.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.device_ids: Vec<String>device_ids selects by device ID.
device_providers: Vec<String>device_providers selects by device token provider.
device_platforms: Vec<String>device_platforms selects by device platform.
device_users: Vec<String>device_users selects by device user.
topics: Vec<String>topics selects by topic.
topic_prefix: Stringtopic_prefix selects by topic prefix.
Implementations§
Source§impl DeviceTopicFilter
impl DeviceTopicFilter
Sourcepub fn new() -> Self
pub fn new() -> Self
Returns an empty DeviceTopicFilter: set its fields with the methods below.
Sourcepub fn device_ids(
self,
value: impl IntoIterator<Item = impl Into<String>>,
) -> Self
pub fn device_ids( self, value: impl IntoIterator<Item = impl Into<String>>, ) -> Self
Sets device_ids.
Sourcepub fn device_providers(
self,
value: impl IntoIterator<Item = impl Into<String>>,
) -> Self
pub fn device_providers( self, value: impl IntoIterator<Item = impl Into<String>>, ) -> Self
Sets device_providers.
Sourcepub fn device_platforms(
self,
value: impl IntoIterator<Item = impl Into<String>>,
) -> Self
pub fn device_platforms( self, value: impl IntoIterator<Item = impl Into<String>>, ) -> Self
Sets device_platforms.
Sourcepub fn device_users(
self,
value: impl IntoIterator<Item = impl Into<String>>,
) -> Self
pub fn device_users( self, value: impl IntoIterator<Item = impl Into<String>>, ) -> Self
Sets device_users.
Sourcepub fn topics(self, value: impl IntoIterator<Item = impl Into<String>>) -> Self
pub fn topics(self, value: impl IntoIterator<Item = impl Into<String>>) -> Self
Sets topics.
Sourcepub fn topic_prefix(self, value: impl Into<String>) -> Self
pub fn topic_prefix(self, value: impl Into<String>) -> Self
Sets topic_prefix.
Trait Implementations§
Source§impl Clone for DeviceTopicFilter
impl Clone for DeviceTopicFilter
Source§impl Debug for DeviceTopicFilter
impl Debug for DeviceTopicFilter
Source§impl Default for DeviceTopicFilter
impl Default for DeviceTopicFilter
Source§impl<'de> Deserialize<'de> for DeviceTopicFilter
impl<'de> Deserialize<'de> for DeviceTopicFilter
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 DeviceTopicFilter
impl RefUnwindSafe for DeviceTopicFilter
impl Send for DeviceTopicFilter
impl Sync for DeviceTopicFilter
impl Unpin for DeviceTopicFilter
impl UnsafeUnpin for DeviceTopicFilter
impl UnwindSafe for DeviceTopicFilter
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