zenoh_keyexpr/key_expr/
mod.rs

1//
2// Copyright (c) 2023 ZettaScale Technology
3//
4// This program and the accompanying materials are made available under the
5// terms of the Eclipse Public License 2.0 which is available at
6// http://www.eclipse.org/legal/epl-2.0, or the Apache License, Version 2.0
7// which is available at https://www.apache.org/licenses/LICENSE-2.0.
8//
9// SPDX-License-Identifier: EPL-2.0 OR Apache-2.0
10//
11// Contributors:
12//   ZettaScale Zenoh Team, <zenoh@zettascale.tech>
13//
14
15//! This module implements the Key Expression Language, as explained in details in [`keyexpr`]'s documentation.
16
17pub(crate) const DELIMITER: u8 = b'/';
18pub(crate) const SINGLE_WILD: u8 = b'*';
19pub(crate) const DOUBLE_WILD: &[u8] = b"**";
20pub(crate) const STAR_DSL: &[u8] = b"$*";
21
22pub(crate) mod owned;
23pub use owned::{OwnedKeyExpr, OwnedNonWildKeyExpr};
24
25pub(crate) mod borrowed;
26pub use borrowed::*;
27
28/// Used to implement and expose the tools to implement canonization of Key Expressions for string-like types.
29/// The average user doesn't need to bother with it.
30pub mod canon;
31/// Used to implement and expose the tools to implement algorithms to detect Key Expression inclusivity.
32/// The average user doesn't need to bother with it.
33pub mod include;
34/// Used to implement and expose the tools to implement algorithms to detect Key Expression intersection.
35/// The average user doesn't need to bother with it.
36pub mod intersect;
37pub(crate) mod utils;
38
39/// Exposes a random Key Expression generator to help with testing.
40#[cfg(feature = "std")]
41pub mod fuzzer;
42
43pub mod format;
44
45#[cfg(test)]
46mod tests;