Enum PropertyCode
#[repr(u32)]pub enum PropertyCode {
Show 27 variants
PayloadFormatIndicator = 1,
MessageExpiryInterval = 2,
ContentType = 3,
ResponseTopic = 8,
CorrelationData = 9,
SubscriptionIdentifier = 11,
SessionExpiryInterval = 17,
AssignedClientIdentifer = 18,
ServerKeepAlive = 19,
AuthenticationMethod = 21,
AuthenticationData = 22,
RequestProblemInformation = 23,
WillDelayInterval = 24,
RequestResponseInformation = 25,
ResponseInformation = 26,
ServerReference = 28,
ReasonString = 31,
ReceiveMaximum = 33,
TopicAliasMaximum = 34,
TopicAlias = 35,
MaximumQos = 36,
RetainAvailable = 37,
UserProperty = 38,
MaximumPacketSize = 39,
WildcardSubscriptionAvailable = 40,
SubscriptionIdentifiersAvailable = 41,
SharedSubscriptionAvailable = 42,
}Expand description
The enumerated codes for the MQTT v5 properties.
The property code defines both the meaning of the value in the property (Correlation Data, Server Keep Alive) and the data type held by the property.
Variants§
PayloadFormatIndicator = 1
[Byte, u8] Indicates whether the payload is unspecified, possibly binary (0) or UTF-8 text (1).
MessageExpiryInterval = 2
[FouByteInteger, u32] The lifetime of the application message in seconds. The broker is required to delete expired messages that have not been passed to a subscriber.
ContentType = 3
[String] Description of the payload. Often the MIME type describing the serialization.
ResponseTopic = 8
[String] The topic name for a response message, such as for the RPC pattern.
CorrelationData = 9
[Binary] Used by the sender of a request message to identify the response. Typically used with the RPC pattern, or just to identify related messages.
SubscriptionIdentifier = 11
[VariableByteInteger] The identifier of the subscription.
SessionExpiryInterval = 17
[FourByteInteger, u32] The number of seconds after which the network connection is closed that the server should keep a persistent session.
AssignedClientIdentifer = 18
[String] The ClientID assigned by the server when it receives a zero-length ClientID in the CONNECT message.
ServerKeepAlive = 19
[TwoByteInteger, u16] The Keep Alive duration that the server requires.
AuthenticationMethod = 21
[String] The name of the authentication method.
AuthenticationData = 22
[Binary] The authentication data
RequestProblemInformation = 23
[Byte, u8] The Client uses this value to indicate whether the Reason String or User Properties are sent in the case of failures.
WillDelayInterval = 24
[Four Byte Integer, u32] The number of seconds after which a network connection is lost before the server should publish the LWT message.
RequestResponseInformation = 25
[Byte, u8] Request that the server return Response Information in the CONNACK
ResponseInformation = 26
[String] A hint for the client to create a response topic.
ServerReference = 28
[String] Can be used by the client to identify another server to use.
ReasonString = 31
[String] A reason associated with the response.
ReceiveMaximum = 33
[TwoByteInteger, u16] The maximum number of QoS 1 and QoS 2 publications that it is willing to process concurrently. If absent, defaults to 65,535.
TopicAliasMaximum = 34
[TwoByteInteger, u16] The highest value that the Client will accept as a Topic Alias sent by the Server. The Client uses this value to limit the number of Topic Aliases that it is willing to hold on this connection.
TopicAlias = 35
[TwoByteInteger, u16] An integer value that is used to identify the topic instead of using the Topic Name. This reduces the size of the PUBLISH packet.
MaximumQos = 36
[Byte] The maximum QoS supported by the server.
RetainAvailable = 37
[Byte] Whether retain messages are supported (1) or not (0).
UserProperty = 38
[StringPair] A user defined property as a key/value string pair.
MaximumPacketSize = 39
[FourByteInteger, u32] The maximum packet size that the client is willing to accept.
WildcardSubscriptionAvailable = 40
[Byte, u8] Whether the server supports wildcard subscriptions (1) or not (0).
SubscriptionIdentifiersAvailable = 41
[Byte, u8] Whether the server supports subscription identifiers (1) or not (0).
[Byte, u8] Whether the server supports shared subscriptions (1) or not (0).
Implementations§
§impl PropertyCode
impl PropertyCode
pub fn new(code: u32) -> Option<PropertyCode>
pub fn new(code: u32) -> Option<PropertyCode>
Tries to create a PropertyCode from the integer value.
pub fn property_type(&self) -> PropertyType
pub fn property_type(&self) -> PropertyType
Get the property type from the code identifier.
Trait Implementations§
§impl Clone for PropertyCode
impl Clone for PropertyCode
§fn clone(&self) -> PropertyCode
fn clone(&self) -> PropertyCode
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more