Enum Property
pub enum Property<'a> {
Show 27 variants
PayloadFormatIndicator(PayloadFormat),
MessageExpiryInterval(u32),
ContentType(&'a MqttStr),
ResponseTopic(&'a Topic),
CorrelationData(&'a MqttBytes),
SubscriptionIdentifier(NonZeroVbi),
SessionExpiryInterval(u32),
AssignedClientIdentifier(&'a MqttStr),
ServerKeepAlive(u16),
AuthenticationMethod(&'a MqttStr),
AuthenticationData(&'a MqttBytes),
RequestProblemInformation(bool),
WillDelayInterval(u32),
RequestResponseInformation(bool),
ResponseInformation(&'a MqttStr),
ServerReference(&'a MqttStr),
ReasonString(&'a MqttStr),
ReceiveMaximum(NonZeroU16),
TopicAliasMaximum(u16),
TopicAlias(NonZeroU16),
MaximumQoS(QoS),
RetainAvailable(bool),
UserProperty(&'a MqttStr, &'a MqttStr),
MaximumPacketSize(NonZeroU32),
WildcardSubscriptionAvailable(bool),
SubscriptionIdentifierAvailable(bool),
SharedSubscriptionAvailable(bool),
}Expand description
A typed MQTT v5 property. Each variant statically guarantees the correct value type for the property identifier.
Variants§
PayloadFormatIndicator(PayloadFormat)
§3.3.2.3.2 — 0 = unspecified bytes, 1 = UTF-8.
MessageExpiryInterval(u32)
Message expiry interval in seconds.
ContentType(&'a MqttStr)
MIME content type of the payload.
ResponseTopic(&'a Topic)
Response topic for request/response pattern.
CorrelationData(&'a MqttBytes)
Correlation data for request/response matching.
SubscriptionIdentifier(NonZeroVbi)
Encoded as a Variable Byte Integer on the wire; must be 1–268 435 455.
SessionExpiryInterval(u32)
Session expiry interval in seconds.
AssignedClientIdentifier(&'a MqttStr)
Client identifier assigned by the server.
ServerKeepAlive(u16)
Server-specified keep-alive interval in seconds.
AuthenticationMethod(&'a MqttStr)
Authentication method name.
AuthenticationData(&'a MqttBytes)
Authentication data.
RequestProblemInformation(bool)
§3.1.2.11.7 — false = 0, true = 1.
WillDelayInterval(u32)
Will delay interval in seconds.
RequestResponseInformation(bool)
§3.1.2.11.6 — false = 0, true = 1.
ResponseInformation(&'a MqttStr)
Reference to response information string.
ServerReference(&'a MqttStr)
Server reference for redirection.
ReasonString(&'a MqttStr)
Human-readable reason string.
ReceiveMaximum(NonZeroU16)
§3.2.2.3.3 — must not be zero.
TopicAliasMaximum(u16)
Maximum topic alias value the receiver accepts.
TopicAlias(NonZeroU16)
§3.3.2.3.4 — must not be zero.
MaximumQoS(QoS)
§3.2.2.3.4 — only QoS 0 or 1 are valid on the wire.
RetainAvailable(bool)
§3.2.2.3.5 — false = 0, true = 1.
UserProperty(&'a MqttStr, &'a MqttStr)
User-defined key-value pair.
MaximumPacketSize(NonZeroU32)
§3.2.2.3.6 — must not be zero.
WildcardSubscriptionAvailable(bool)
§3.2.2.3.12 — false = 0, true = 1.
SubscriptionIdentifierAvailable(bool)
§3.2.2.3.13 — false = 0, true = 1.
§3.2.2.3.14 — false = 0, true = 1.
Implementations§
§impl Property<'_>
impl Property<'_>
pub const fn id(&self) -> PropertyId
pub const fn id(&self) -> PropertyId
Returns the property identifier for this property.
pub const fn encoded_len(&self) -> usize
pub const fn encoded_len(&self) -> usize
Encoded byte length of this property on the wire (id VBI + value).