pub fn includes(a: &str, b: &str) -> boolExpand description
Returns whether one key expression selects every key another one selects.
§Arguments
a- the key expression that may be the wider one.b- the key expression tested for being covered bya.
§Returns
true if every concrete key b selects is also selected by a, so a subscription on a
already receives everything one on b would; false otherwise, or if either expression is
not valid. An expression includes itself, and inclusion implies intersects.
§Examples
use pamoja_zenoh::keyexpr::includes;
assert!(includes("fleet/**", "fleet/*/battery"));
assert!(!includes("fleet/*/battery", "fleet/**"));
assert!(includes("fleet/n$*", "fleet/n7")); // the sub-chunk wildcard selects within a chunk