Provides utility functions for working with Zenoh key expressions (keyexpr).
Key expressions in Zenoh define paths or patterns used to match resources. These utilities help manage their correctness and relationships.
Summary
Functions
Canonizes the key_expr.
Returns true if key_expr1 includes key_expr2.
Returns true if the keyexprs intersect.
Joins two key expressions, inserting a / between them.
Validate the key_expr.
Functions
Canonizes the key_expr.
Examples
iex> Zenohex.KeyExpr.canonize("key/expr/**/*")
{:ok, "key/expr/*/**"}
Returns true if key_expr1 includes key_expr2.
The set defined by key_expr1 contains every key belonging to the set defined by key_expr2.
Returns true if the keyexprs intersect.
There exists at least one key which is contained in both of the sets defined by key_expr1 and key_expr2.
Joins two key expressions, inserting a / between them.
Returns the resulting key expression string, canonized.
Examples
iex> Zenohex.KeyExpr.join("key/expr", "sub")
{:ok, "key/expr/sub"}
Validate the key_expr.