Module wire

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ยง

FixedHeader
Fixed header of an MQTT packet (first byte + remaining length).
MqttBytes
A byte slice that satisfies the MQTT v5 Binary Data length limit (at most 65 535 bytes).
MqttBytesBufalloc
Owned binary data that satisfies the MQTT v5 length limit.
MqttStr
A UTF-8 string that satisfies all MQTT v5 requirements:
MqttStringalloc
An owned UTF-8 string that satisfies all MQTT v5 requirements.
NonZeroVbi
Non-zero Variable Byte Integer.
PacketId
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ยง

DataError
Error returned when constructing an MqttStr or MqttBytes from invalid input.
DecodeError
Errors that can occur during decoding.
EncodeError
Errors that can occur during encoding.
PacketType
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).