Skip to content

Commit b6d447d

Browse files
author
Devdutt Shenoi
committed
doc: code comments
1 parent b664fd6 commit b6d447d

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

rumqttc/src/lib.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,7 @@ impl From<Unsubscribe> for Request {
225225
}
226226
}
227227

228+
/// Packet Identifier with which Publish/Subscribe/Unsubscribe packets are identified while inflight.
228229
pub type Pkid = u16;
229230

230231
#[derive(Debug, thiserror::Error)]
@@ -235,6 +236,9 @@ pub enum PromiseError {
235236
Rejected { reason: String },
236237
}
237238

239+
/// Resolves with [`Pkid`] used against packet when:
240+
/// 1. Packet is acknowldged by the broker, e.g. QoS 1/2 Publish, Subscribe and Unsubscribe
241+
/// 2. QoS 0 packet finishes processing in the [`EventLoop`]
238242
pub struct AckPromise {
239243
rx: oneshot::Receiver<Result<Pkid, PromiseError>>,
240244
}

0 commit comments

Comments
 (0)