Struct mqtt::topic_filter::TopicFilter [−][src]
pub struct TopicFilter(_);Expand description
Topic filter
http://docs.oasis-open.org/mqtt/mqtt/v3.1.1/os/mqtt-v3.1.1-os.html#_Toc398718106
use mqtt::{TopicFilter, TopicNameRef};
let topic_filter = TopicFilter::new("sport/+/player1").unwrap();
let matcher = topic_filter.get_matcher();
assert!(matcher.is_match(TopicNameRef::new("sport/abc/player1").unwrap()));Implementations
Creates a new topic filter from string Return error if it is not a valid topic filter
Creates a new topic filter from string without validation
Safety
Topic filters’ syntax is defined in MQTT specification. Creating a filter from raw string may cause errors
Methods from Deref<Target = TopicFilterRef>
Get a matcher
Trait Implementations
type Error = TopicFilterDecodeError
fn decode_with<R: Read>(
reader: &mut R,
_rest: ()
) -> Result<TopicFilter, TopicFilterDecodeError>
fn decode_with<R: Read>(
reader: &mut R,
_rest: ()
) -> Result<TopicFilter, TopicFilterDecodeError>
Decodes object with additional data (or hints)
type Target = TopicFilterRef
type Target = TopicFilterRef
The resulting type after dereferencing.
Dereferences the value.
Performs the conversion.
This method tests for self and other values to be equal, and is used
by ==. Read more
This method tests for !=.
This method returns an ordering between self and other values if one exists. Read more
This method tests less than (for self and other) and is used by the < operator. Read more
This method tests less than or equal to (for self and other) and is used by the <=
operator. Read more
This method tests greater than (for self and other) and is used by the > operator. Read more
Auto Trait Implementations
impl RefUnwindSafe for TopicFilter
impl Send for TopicFilter
impl Sync for TopicFilter
impl Unpin for TopicFilter
impl UnwindSafe for TopicFilter
Blanket Implementations
Mutably borrows from an owned value. Read more