mqtt_codec_kit/common/
mod.rs

1pub use self::{
2    encodable::{Decodable, Encodable},
3    qos::QualityOfService,
4    topic_filter::TopicFilter,
5    topic_name::{TopicName, TopicNameDecodeError, TopicNameError, TopicNameRef},
6    variable_header::*,
7};
8
9pub mod encodable;
10pub mod packet;
11pub mod qos;
12pub mod topic_filter;
13pub mod topic_name;
14pub mod variable_header;
15
16/// Character used to separate each level within a topic tree and provide a hierarchical structure.
17pub const LEVEL_SEP: char = '/';
18/// Wildcard character that matches only one topic level.
19pub const MATCH_ONE_CHAR: char = '+';
20/// Wildcard character that matches any number of levels within a topic.
21pub const MATCH_ALL_CHAR: char = '#';
22/// The &str version of `MATCH_ONE_CHAR`
23pub const MATCH_ONE_STR: &str = "+";
24/// The &str version of `MATCH_ALL_CHAR`
25pub const MATCH_ALL_STR: &str = "#";
26/// The &str version of `MATCH_DOLLAR_STR`
27pub const MATCH_DOLLAR_STR: &str = "$";
28
29/// System topic prefix
30pub const SYS_PREFIX: &str = "$SYS/";
31/// Shared topic prefix
32pub const SHARED_PREFIX: &str = "$share/";