topic_matches_filter

Function topic_matches_filter 

Source
pub fn topic_matches_filter(topic: &str, filter: &str) -> bool
Expand description

Checks if a topic name matches a topic filter

§Rules:

  • ‘+’ matches exactly one topic level
  • ‘#’ matches any number of levels including parent level
  • Topic and filter level separators must match exactly
  • Topics starting with ‘$’ do NOT match root-level wildcards (MQTT spec)