Skip to main content

Module property

Module property 

Expand description

Property encoding, decoding, and iteration.

Properties is a borrowed byte slice iterable via PropertiesIter. Each entry decodes into a Property variant that statically guarantees the correct value type.

Properties and PropertiesBuf are parameterised over a Constraint marker that determines which Ids are permitted. Per-packet type aliases (e.g. ConnectProperties, PublishProperties) select the allowed set at compile time so that invalid properties cannot be constructed by mistake. Use AnyProperties when no restrictions apply.

Modulesยง

constraint ๐Ÿ”’
Per-packet property constraint markers.
id ๐Ÿ”’
id_set ๐Ÿ”’
payload_format ๐Ÿ”’
properties ๐Ÿ”’
properties_buf ๐Ÿ”’ alloc

Structsยง

IdSet
A set of property ids.
IdSetIter
An iterator over the property ids in a IdSet.
Properties
A borrowed view over a properties section.
PropertiesBufalloc
Owned property bytes, the owned counterpart to Properties<P>.
PropertiesIter
Iterator over property entries.

Enumsยง

Id
Property identifier.
PayloadFormat
Payload format indicator (ยง3.3.2.3.2).
PropertiesBufErroralloc
Error returned by fallible mutation methods on PropertiesBuf.
Property
A typed MQTT v5 property. Each variant statically guarantees the correct value type for the property identifier.

Constantsยง

TOPIC_ALIAS_LEN ๐Ÿ”’
Encoded length of a Topic Alias property: the id byte and a u16.

Traitsยง

Constraint
Marker trait describing which property IDs are permitted in a Properties or PropertiesBuf collection.

Functionsยง

read_bool ๐Ÿ”’

Type Aliasesยง

AckProperties
Properties constrained to ACK (PUBACK/PUBREC/PUBREL/PUBCOMP) property IDs.
AckPropertiesBufalloc
PropertiesBuf constrained to ACK property IDs.
AnyProperties
Properties without any restriction on allowed property IDs.
AnyPropertiesBufalloc
PropertiesBuf without any restriction on allowed property IDs.
AuthProperties
Properties constrained to AUTH packet property IDs.
AuthPropertiesBufalloc
PropertiesBuf constrained to AUTH packet property IDs.
ConnackProperties
Properties constrained to CONNACK packet property IDs.
ConnackPropertiesBufalloc
PropertiesBuf constrained to CONNACK packet property IDs.
ConnectProperties
Properties constrained to CONNECT packet property IDs.
ConnectPropertiesBufalloc
PropertiesBuf constrained to CONNECT packet property IDs.
DisconnectProperties
Properties constrained to DISCONNECT packet property IDs.
DisconnectPropertiesBufalloc
PropertiesBuf constrained to DISCONNECT packet property IDs.
PublishProperties
Properties of a PUBLISH the client sends.
PublishPropertiesBufalloc
PropertiesBuf of a PUBLISH the client sends.
ReceivedPublishProperties
Properties of a received PUBLISH.
ReceivedPublishPropertiesBufalloc
PropertiesBuf of a received PUBLISH.
SubackProperties
Properties constrained to SUBACK packet property IDs.
SubackPropertiesBufalloc
PropertiesBuf constrained to SUBACK packet property IDs.
SubscribeProperties
Properties constrained to SUBSCRIBE packet property IDs.
SubscribePropertiesBufalloc
PropertiesBuf constrained to SUBSCRIBE packet property IDs.
UnsubackProperties
Properties constrained to UNSUBACK packet property IDs.
UnsubackPropertiesBufalloc
PropertiesBuf constrained to UNSUBACK packet property IDs.
UnsubscribeProperties
Properties constrained to UNSUBSCRIBE packet property IDs.
UnsubscribePropertiesBufalloc
PropertiesBuf constrained to UNSUBSCRIBE packet property IDs.
WillProperties
Properties constrained to Will property IDs.
WillPropertiesBufalloc
PropertiesBuf constrained to Will property IDs.