pub fn matches(topic: &str, filter: &str) -> boolExpand description
Matches a topic name against a topic filter with wildcard support
§Arguments
topic- The topic name to match (no wildcards allowed)filter- The topic filter which may contain wildcards
§Returns
trueif the topic matches the filterfalseotherwise
§Examples
assert!(matches("sport/tennis", "sport/tennis"));
assert!(matches("sport/tennis", "sport/+"));
assert!(matches("sport/tennis/player1", "sport/#"));
assert!(!matches("sport/tennis", "sport/+/player1"));