Module commands
Available on crate feature
tokio only.Expand description
Commands sent from the client handle to the event loop.
Each command contains two completion channels:
-
queued_txis fired once the commandβs session mutation has been made durable, regardless of connection state:- Subscriptions and
QoS>= 1 publishes: after the persist that covers the stored filter / outbox entry succeeds (immediately after the mutation when no persistence is configured). QoS0 publishes: immediately on acceptance (no durable state).
The
Optionwrapper allows the event loop to pre-fire the signal during the offline backoff phase and then process the wire send later. - Subscriptions and
-
completion_txis fired when the broker acknowledges the operation (PUBACK / PUBCOMP / SUBACK / UNSUBACK). ForQoS0 publishes it is resolved when the bytes are written.
StructsΒ§
- Pending
Ack π - Held by the event loop for an in-flight SUBSCRIBE or UNSUBSCRIBE, keyed by packet id. The core now owns the filter list and the reason-code rules; the runtime only needs to resolve the user-facing future on the ack.
- Pending
Publish π - Held by the event loop for each in-flight
QoS>= 1 publish. - Publish
Command π - A publish request from a client handle.
- UserAck π
- A user future waiting for a SUBACK or UNSUBACK.
EnumsΒ§
- Command π