From 79d5ff83fc14c669917b50e148ce482c47b0cf56 Mon Sep 17 00:00:00 2001 From: Devdutt Shenoi Date: Wed, 2 Oct 2024 12:19:18 +0530 Subject: [PATCH] doc: comment on `blocking_wait` --- rumqttc/src/lib.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/rumqttc/src/lib.rs b/rumqttc/src/lib.rs index 75af3645..2a6ead18 100644 --- a/rumqttc/src/lib.rs +++ b/rumqttc/src/lib.rs @@ -258,6 +258,10 @@ impl Future for AckPromise { } impl AckPromise { + /// Blocks on the current thread and waits till the packet is acknowledged by the broker. + /// + /// Returns [`PromiseError::Disconnected`] if the [`EventLoop`] was dropped(usually), + /// [`PromiseError::Rejected`] if the packet acknowledged but not accepted. pub fn blocking_wait(self) -> Result { self.rx .blocking_recv()