Struct aws_sdk_iot::types::MqttHeaders
source · #[non_exhaustive]pub struct MqttHeaders {
pub payload_format_indicator: Option<String>,
pub content_type: Option<String>,
pub response_topic: Option<String>,
pub correlation_data: Option<String>,
pub message_expiry: Option<String>,
pub user_properties: Option<Vec<UserProperty>>,
}
Expand description
Specifies MQTT Version 5.0 headers information. For more information, see MQTT from Amazon Web Services IoT Core Developer Guide.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.payload_format_indicator: Option<String>
An Enum
string value that indicates whether the payload is formatted as UTF-8.
Valid values are UNSPECIFIED_BYTES
and UTF8_DATA
.
For more information, see Payload Format Indicator from the MQTT Version 5.0 specification.
Supports substitution templates.
content_type: Option<String>
A UTF-8 encoded string that describes the content of the publishing message.
For more information, see Content Type from the MQTT Version 5.0 specification.
Supports substitution templates.
response_topic: Option<String>
A UTF-8 encoded string that's used as the topic name for a response message. The response topic is used to describe the topic which the receiver should publish to as part of the request-response flow. The topic must not contain wildcard characters.
For more information, see Response Topic from the MQTT Version 5.0 specification.
Supports substitution templates.
correlation_data: Option<String>
The base64-encoded binary data used by the sender of the request message to identify which request the response message is for when it's received.
For more information, see Correlation Data from the MQTT Version 5.0 specification.
This binary data must be based64-encoded.
Supports substitution templates.
message_expiry: Option<String>
A user-defined integer value that will persist a message at the message broker for a specified amount of time to ensure that the message will expire if it's no longer relevant to the subscriber. The value of messageExpiry
represents the number of seconds before it expires. For more information about the limits of messageExpiry
, see Amazon Web Services IoT Core message broker and protocol limits and quotas from the Amazon Web Services Reference Guide.
Supports substitution templates.
user_properties: Option<Vec<UserProperty>>
An array of key-value pairs that you define in the MQTT5 header.
Implementations§
source§impl MqttHeaders
impl MqttHeaders
sourcepub fn payload_format_indicator(&self) -> Option<&str>
pub fn payload_format_indicator(&self) -> Option<&str>
An Enum
string value that indicates whether the payload is formatted as UTF-8.
Valid values are UNSPECIFIED_BYTES
and UTF8_DATA
.
For more information, see Payload Format Indicator from the MQTT Version 5.0 specification.
Supports substitution templates.
sourcepub fn content_type(&self) -> Option<&str>
pub fn content_type(&self) -> Option<&str>
A UTF-8 encoded string that describes the content of the publishing message.
For more information, see Content Type from the MQTT Version 5.0 specification.
Supports substitution templates.
sourcepub fn response_topic(&self) -> Option<&str>
pub fn response_topic(&self) -> Option<&str>
A UTF-8 encoded string that's used as the topic name for a response message. The response topic is used to describe the topic which the receiver should publish to as part of the request-response flow. The topic must not contain wildcard characters.
For more information, see Response Topic from the MQTT Version 5.0 specification.
Supports substitution templates.
sourcepub fn correlation_data(&self) -> Option<&str>
pub fn correlation_data(&self) -> Option<&str>
The base64-encoded binary data used by the sender of the request message to identify which request the response message is for when it's received.
For more information, see Correlation Data from the MQTT Version 5.0 specification.
This binary data must be based64-encoded.
Supports substitution templates.
sourcepub fn message_expiry(&self) -> Option<&str>
pub fn message_expiry(&self) -> Option<&str>
A user-defined integer value that will persist a message at the message broker for a specified amount of time to ensure that the message will expire if it's no longer relevant to the subscriber. The value of messageExpiry
represents the number of seconds before it expires. For more information about the limits of messageExpiry
, see Amazon Web Services IoT Core message broker and protocol limits and quotas from the Amazon Web Services Reference Guide.
Supports substitution templates.
sourcepub fn user_properties(&self) -> &[UserProperty]
pub fn user_properties(&self) -> &[UserProperty]
An array of key-value pairs that you define in the MQTT5 header.
If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use .user_properties.is_none()
.
source§impl MqttHeaders
impl MqttHeaders
sourcepub fn builder() -> MqttHeadersBuilder
pub fn builder() -> MqttHeadersBuilder
Creates a new builder-style object to manufacture MqttHeaders
.
Trait Implementations§
source§impl Clone for MqttHeaders
impl Clone for MqttHeaders
source§fn clone(&self) -> MqttHeaders
fn clone(&self) -> MqttHeaders
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for MqttHeaders
impl Debug for MqttHeaders
source§impl PartialEq for MqttHeaders
impl PartialEq for MqttHeaders
source§fn eq(&self, other: &MqttHeaders) -> bool
fn eq(&self, other: &MqttHeaders) -> bool
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for MqttHeaders
Auto Trait Implementations§
impl Freeze for MqttHeaders
impl RefUnwindSafe for MqttHeaders
impl Send for MqttHeaders
impl Sync for MqttHeaders
impl Unpin for MqttHeaders
impl UnwindSafe for MqttHeaders
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more