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 PropertyConstraint marker that determines which PropertyIds are permitted. Per-packet type aliases (e.g. ConnectProperties, PublishProperties) bake the allowed set into the type system 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ยง

Ack
Constraint marker for PUBACK, PUBREC, PUBREL, and PUBCOMP properties.
Any
Constraint marker that permits any PropertyId.
Auth
Constraint marker for AUTH packet properties.
Connack
Constraint marker for CONNACK packet properties.
Connect
Constraint marker for CONNECT packet properties.
Disconnect
Constraint marker for DISCONNECT packet properties.
Properties
A borrowed view over a properties section.
PropertiesBufalloc
Owned property bytes, the owned counterpart to Properties<P>.
PropertiesIter
Iterator over property entries.
PropertyIdSet
A set of property ids.
PropertyIdSetIter
An iterator over the property ids in a PropertyIdSet.
Publish
Constraint marker for PUBLISH packet properties.
Suback
Constraint marker for SUBACK packet properties.
Subscribe
Constraint marker for SUBSCRIBE packet properties.
Unsuback
Constraint marker for UNSUBACK packet properties.
Unsubscribe
Constraint marker for UNSUBSCRIBE packet properties.
Will
Constraint marker for Will (within CONNECT) properties.

Enumsยง

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.
PropertyId
Property identifier.

Traitsยง

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

Functionsยง

read_bool ๐Ÿ”’
Reads a single byte as a bool.
read_property ๐Ÿ”’
write_property ๐Ÿ”’
Writes a single property into a buffer.

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 constrained to PUBLISH packet property IDs.
PublishPropertiesBufalloc
PropertiesBuf constrained to PUBLISH packet property IDs.
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.