Struct PendingPublish
pub struct PendingPublish {
pub progress_tx: Sender<PublishProgress>,
pub completion_tx: Sender<Result<ReasonCode, Error>>,
pub deadline: Option<Instant>,
}Expand description
Held by the event loop for each in-flight QoS >= 1 publish.
Tracking is keyed by PacketId, which
per §4.4 is preserved across reconnects when the session is resumed
and so doubles as the stable handle for the user-facing completion
future.
Fields§
§progress_tx: Sender<PublishProgress>Kept alive so the watch channel doesn’t error on recv while the
caller is still observing progress.
completion_tx: Sender<Result<ReasonCode, Error>>§deadline: Option<Instant>Ack-timeout deadline, set once the packet is written to the wire and
only when ack_timeout is enabled.
Mirrors the entry in Pending deadline schedule so
the schedule entry can be removed on acknowledgement.
Auto Trait Implementations§
impl Freeze for PendingPublish
impl !RefUnwindSafe for PendingPublish
impl Send for PendingPublish
impl Sync for PendingPublish
impl Unpin for PendingPublish
impl !UnwindSafe for PendingPublish
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more