Module wire
Expand description
Wire-format primitives.
Data types (MqttStr, MqttString, MqttBytes, MqttBytesBuf),
core protocol types (PacketId, QoS, FixedHeader,
PacketType), and Reader / Writer for low-level encoding and
decoding.
Modulesยง
- mqtt_
bytes ๐ - mqtt_
bytes_ ๐buf alloc - mqtt_
str ๐ - mqtt_
string ๐alloc - reader ๐
- vbi ๐
- writer ๐
Structsยง
- Fixed
Header - Fixed header of an MQTT packet (first byte + remaining length).
- Mqtt
Bytes - A byte slice that satisfies the MQTT v5 Binary Data length limit (at most 65 535 bytes).
- Mqtt
Bytes Buf alloc - Owned binary data that satisfies the MQTT v5 length limit.
- MqttStr
- A UTF-8 string that satisfies all MQTT v5 requirements:
- Mqtt
String alloc - An owned UTF-8 string that satisfies all MQTT v5 requirements.
- NonZero
Vbi - Non-zero Variable Byte Integer.
- Packet
Id - MQTT Packet Identifier (ยง2.2.1).
- Reader
- MQTT wire format reader.
- Vbi
- Variable Byte Integer (VBI) as defined in MQTT v5 ยง1.5.5.
- Writer
- MQTT wire format writer.
Enumsยง
- Data
Error - Error returned when constructing an
MqttStrorMqttBytesfrom invalid input. - Decode
Error - Errors that can occur during decoding.
- Encode
Error - Errors that can occur during encoding.
- Packet
Type - MQTT v5 packet type (4-bit value from the fixed header).
- QoS
- Quality of Service level.
Constantsยง
- MAX_
DATA_ LEN - Maximum byte length of an MQTT UTF-8 Encoded String or Binary Data field (limited by the 2-byte length prefix).