Skip to main content

Module wire

Module wire 

Expand description

Wire-format primitives.

Modulesยง

delivery ๐Ÿ”’
mqtt_bytes ๐Ÿ”’
mqtt_bytes_buf ๐Ÿ”’ alloc
mqtt_str ๐Ÿ”’
mqtt_string ๐Ÿ”’ alloc
payload ๐Ÿ”’
payload_buf ๐Ÿ”’ alloc
reader ๐Ÿ”’
sink ๐Ÿ”’
vbi ๐Ÿ”’
writer ๐Ÿ”’

Structsยง

CapacityExceeded
Error returned by fixed-size storage that has no room for more bytes.
Counter
A sink that only counts the bytes put into it.
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 meets the MQTT v5 requirements:
MqttStringalloc
An owned UTF-8 string that meets the MQTT v5 requirements.
NonZeroVbi
Non-zero Variable Byte Integer.
PacketId
MQTT Packet Identifier (ยง2.2.1).
Payload
An application message payload.
PayloadBufalloc
An owned Payload.
PayloadTooLarge
Error returned when a payload exceeds Payload::MAX_LEN.
Reader
MQTT wire format reader.
SliceSink
A sink over a fixed slice that tracks how many bytes were written.
Vbi
Variable Byte Integer (VBI) as defined in MQTT v5 ยง1.5.5.
Writer
Writes MQTT wire-format fields into a Sink.

Enumsยง

AckQoS
A QoS level that the receiver acknowledges: 1 or 2.
DataError
Error returned when constructing an MqttStr or MqttBytes from invalid input.
DecodeError
Errors that can occur during decoding.
Delivery
The QoS level of a PUBLISH. QoS 1 and 2 add a packet identifier and the DUP flag.
EncodeError
Error from encoding a value whose encoded length has a protocol limit.
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).

Traitsยง

Encode
A value with a fixed MQTT wire encoding.
Sink
Destination for encoded bytes.