Crate mqtt_proto

Source

Modules§

v3
Codec for MQTT v3.1.1 and v3.1
v5
Codec for MQTT v5.0

Structs§

FromStd
Adapter from std::io traits.
FromTokio
Adapter from tokio::io traits.
GenericPollBodyState
GenericPollPacket
Pid
Packet identifier
PollHeaderState
ToStd
Adapter to std::io traits.
TopicFilter
Topic filter.
TopicName
Topic name.

Enums§

Error
Errors returned by encoding and decoding process.
GenericPollPacketState
IoErrorKind
IoErrorKind for both std and no-std environments
Protocol
Protocol version.
QoS
Packet delivery Quality of Service level.
QosPid
Combined QoS and Pid.
VarBytes
A bytes data structure represent a dynamic vector or fixed array.

Constants§

LEVEL_SEP
Character used to separate each level within a topic tree and provide a hierarchical structure.
MATCH_ALL_CHAR
Wildcard character that matches any number of levels within a topic.
MATCH_ALL_STR
The &str version of MATCH_ALL_CHAR
MATCH_ONE_CHAR
Wildcard character that matches only one topic level.
MATCH_ONE_STR
The &str version of MATCH_ONE_CHAR
SHARED_PREFIX
Shared topic prefix
SYS_PREFIX
System topic prefix

Traits§

Encodable
The ability of encoding type into write trait, and calculating encoded size.
PollHeader

Functions§

decode_raw_header
Read first byte(packet type and flags) and decode remaining length
header_len
Calculate header length by given total length (the total length MUST be valid value).
remaining_len
Calculate remaining length by given total length (the total length MUST be valid value).
total_len
Return the packet total encoded length by a given remaining length.
var_int_len
Return the encoded size of the variable byte integer.