pub struct Delivery { /* private fields */ }Expand description
The broker’s acknowledgment of one published message, still to come.
A message published at QoS 1 is settled by the broker’s PUBACK, and one at QoS 2 by
its PUBCOMP, the last step of the exchange that delivers it exactly once (OASIS MQTT
3.1.1, sections 4.3.2 and 4.3.3). MQTT acknowledges nothing at QoS 0, so such a message
is settled once the connection has taken it.
Implementations§
Source§impl Delivery
impl Delivery
Sourcepub async fn confirmed(self) -> Result<()>
pub async fn confirmed(self) -> Result<()>
Waits for the broker to acknowledge the message.
§Returns
Ok(()) once the broker holds the message.
§Errors
Returns Error::Transport if the connection ended before the acknowledgment
arrived, or Error::Closed if the transport was disconnected first. Either way
the message may or may not have reached the broker.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Delivery
impl !UnwindSafe for Delivery
impl Freeze for Delivery
impl Send for Delivery
impl Sync for Delivery
impl Unpin for Delivery
impl UnsafeUnpin for Delivery
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