[−][src]Struct paho_mqtt_sys::MQTTAsync_message
A structure representing the payload and attributes of an MQTT message. The message topic is not part of this structure (see MQTTAsync_publishMessage(), MQTTAsync_publish(), MQTTAsync_receive(), MQTTAsync_freeMessage() and MQTTAsync_messageArrived()).
Fields
struct_id: [c_char; 4]
The eyecatcher for this structure. must be MQTM.
struct_version: c_int
The version number of this structure. Must be 0 or 1. 0 indicates no message properties
payloadlen: c_int
The length of the MQTT message payload in bytes.
payload: *mut c_void
A pointer to the payload of the MQTT message.
qos: c_int
The quality of service (QoS) assigned to the message. There are three levels of QoS:
- QoS0
- Fire and forget - the message may not be delivered
- QoS1
- At least once - the message will be delivered, but may be delivered more than once in some circumstances.
- QoS2
- Once and one only - the message will be delivered exactly once.
retained: c_int
The retained flag serves two purposes depending on whether the message it is associated with is being published or received.
retained = true
For messages being published, a true setting indicates that the MQTT
server should retain a copy of the message. The message will then be
transmitted to new subscribers to a topic that matches the message topic.
For subscribers registering a new subscription, the flag being true
indicates that the received message is not a new one, but one that has
been retained by the MQTT server.
retained = false
For publishers, this indicates that this message should not be retained
by the MQTT server. For subscribers, a false setting indicates this is
a normal message, received as a result of it being published to the
server.
dup: c_int
The dup flag indicates whether or not this message is a duplicate. It is only meaningful when receiving QoS1 messages. When true, the client application should take appropriate action to deal with the duplicate message.
msgid: c_int
The message identifier is normally reserved for internal use by the MQTT client and server.
properties: MQTTProperties
The MQTT V5 properties associated with the message.
Trait Implementations
impl Clone for MQTTAsync_message
[src]
pub fn clone(&self) -> MQTTAsync_message
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Copy for MQTTAsync_message
[src]
impl Debug for MQTTAsync_message
[src]
impl Default for MQTTAsync_message
[src]
pub fn default() -> MQTTAsync_message
[src]
Auto Trait Implementations
impl RefUnwindSafe for MQTTAsync_message
impl !Send for MQTTAsync_message
impl !Sync for MQTTAsync_message
impl Unpin for MQTTAsync_message
impl UnwindSafe for MQTTAsync_message
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,