Crate mqtt_proto
source ·Modules
- Codec for MQTT v5.0
Structs
- Packet identifier
- Topic filter.
- Topic name.
Enums
- Errors returned by encoding and decoding process.
- Protocol version.
- Packet delivery Quality of Service level.
- A bytes data structure represent a dynamic vector or fixed array.
Constants
- Character used to separate each level within a topic tree and provide a hierarchical structure.
- Wildcard character that matches any number of levels within a topic.
- The &str version of
MATCH_ALL_CHAR
- Wildcard character that matches only one topic level.
- The &str version of
MATCH_ONE_CHAR
- Shared topic prefix
- System topic prefix
Traits
- The ability of encoding type into
io::Write
, and calculating encoded size.
Functions
- Read first byte(packet type and flags) and decode remaining length
- Calculate header length by given total length (the total length MUST be valid value).
- Calculate remaining length by given total length (the total length MUST be valid value).
- Return the packet total encoded length by a given remaining length.
- Return the encoded size of the variable byte integer.