zenoh_protocol_core/key_expr/
mod.rs

1//
2// Copyright (c) 2022 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"$*";
21pub(crate) const FORBIDDEN_CHARS: [u8; 3] = [b'#', b'?', b'$'];
22
23pub(crate) mod owned;
24pub use owned::OwnedKeyExpr;
25
26pub(crate) mod borrowed;
27pub use borrowed::*;
28
29/// Used to implement and expose the tools to implement canonization of Key Expressions for string-like types.
30/// The average user doesn't need to bother with it.
31pub mod canon;
32/// Used to implement and expose the tools to implement algorithms to detect Key Expression inclusivity.
33/// The average user doesn't need to bother with it.
34pub mod include;
35/// Used to implement and expose the tools to implement algorithms to detect Key Expression intersection.
36/// The average user doesn't need to bother with it.
37pub mod intersect;
38pub(crate) mod utils;
39
40/// Exposes a random Key Expression generator to help with testing.
41pub mod fuzzer;
42#[cfg(test)]
43pub mod test;