pub struct TopicName { /* private fields */ }
Expand description
Represents an MQTT topic name
Implementations§
Source§impl TopicName
impl TopicName
Sourcepub fn from_string(topic_name: String) -> Result<TopicName, TopicParseError>
pub fn from_string(topic_name: String) -> Result<TopicName, TopicParseError>
Create a new TopicName
from a String
§Arguments
topic_name
- The MQTT topic name
§Errors
TopicParseError
- If the topic name is invalid for an MQTT topic name
Sourcepub fn matches_topic_filter(&self, topic_filter: &TopicFilter) -> bool
pub fn matches_topic_filter(&self, topic_filter: &TopicFilter) -> bool
Check if the TopicName
matches given TopicFilter
§Arguments
topic_filter
- The MQTT topic filter to match against
Sourcepub fn is_valid_topic_name(topic_name: &str) -> bool
pub fn is_valid_topic_name(topic_name: &str) -> bool
Returns true if the MQTT topic name is valid
§Arguments
topic_name
- The MQTT topic name to check validity of
Trait Implementations§
impl Eq for TopicName
Auto Trait Implementations§
impl Freeze for TopicName
impl RefUnwindSafe for TopicName
impl Send for TopicName
impl Sync for TopicName
impl Unpin for TopicName
impl UnwindSafe for TopicName
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