pub struct MqttMessage { /* private fields */ }Expand description
A message delivered by an MqttSubscriber.
ack acknowledges through the protocol for QoS 1 (PUBACK) and QoS 2 (PUBREC, with the
client completing the handshake); QoS 0 deliveries report
AckError::Unsupported. MQTT has no negative acknowledgement, so nack(requeue = true)
reports AckError::Unsupported as well - unacknowledged messages redeliver when the
session resumes - and nack(requeue = false) acknowledges (dropping is the only terminal
outcome the protocol offers).
Implementations§
Trait Implementations§
Source§impl Debug for MqttMessage
impl Debug for MqttMessage
Source§impl IncomingMessage for MqttMessage
impl IncomingMessage for MqttMessage
Source§async fn ack(self) -> Result<(), AckError>
async fn ack(self) -> Result<(), AckError>
Acknowledges successful processing. Consumes the message handle. Read more
Source§async fn nack(self, requeue: bool) -> Result<(), AckError>
async fn nack(self, requeue: bool) -> Result<(), AckError>
Negatively acknowledges the message. When
requeue is true the broker should
redeliver according to its own retry policy; when false it should drop or dead-letter
the message. Read moreSource§fn partition_key(&self) -> Option<&[u8]>
fn partition_key(&self) -> Option<&[u8]>
Returns the routing key the broker partitioned this message by, or
None when the
message carries no key. Read moreSource§fn supports_nack_after(&self) -> bool
fn supports_nack_after(&self) -> bool
Reports whether this transport can honor
nack_after natively. Read moreAuto Trait Implementations§
impl !Freeze for MqttMessage
impl RefUnwindSafe for MqttMessage
impl Send for MqttMessage
impl Sync for MqttMessage
impl Unpin for MqttMessage
impl UnsafeUnpin for MqttMessage
impl UnwindSafe for MqttMessage
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
Mutably borrows from an owned value. Read more