Skip to content

Commit

Permalink
doc: comment on blocking_wait
Browse files Browse the repository at this point in the history
  • Loading branch information
de-sh committed Oct 2, 2024
1 parent 979cb8f commit 79d5ff8
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions rumqttc/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<Pkid, PromiseError> {
self.rx
.blocking_recv()
Expand Down

0 comments on commit 79d5ff8

Please sign in to comment.