Struct UserAck
pub(super) struct UserAck {
tx: Sender<Result<Vec<FilterOutcome>, Error>>,
filters: Vec<(TopicFilterBuf, Option<usize>)>,
}Available on crate feature
tokio only.Expand description
A user future waiting for a SUBACK or UNSUBACK.
Fields§
§tx: Sender<Result<Vec<FilterOutcome>, Error>>§filters: Vec<(TopicFilterBuf, Option<usize>)>The requested filters in request order, each with its position in the
packet last sent. None until sent, or if the filter moved to a later
request before.
Implementations§
§impl UserAck
impl UserAck
pub(super) fn new( tx: Sender<Result<Vec<FilterOutcome>, Error>>, filters: impl IntoIterator<Item = TopicFilterBuf>, ) -> Self
pub(super) fn into_sender(self) -> Sender<Result<Vec<FilterOutcome>, Error>>
pub(super) fn into_sender(self) -> Sender<Result<Vec<FilterOutcome>, Error>>
The channel of the user future.
pub(super) fn sent<'a>(
&mut self,
sent: impl Iterator<Item = (&'a TopicFilter, usize)>,
)
pub(super) fn sent<'a>( &mut self, sent: impl Iterator<Item = (&'a TopicFilter, usize)>, )
Records the position of each requested filter in the packet just sent.
sent holds the filters of that packet with their positions.
pub(super) fn acked(self, reason_codes: &[ReasonCode])
pub(super) fn acked(self, reason_codes: &[ReasonCode])
Resolves the user future with the reason codes of the ack, in the order of the packet sent.
pub(super) fn superseded(self)
pub(super) fn superseded(self)
Resolves the user future for a request whose filters all moved to later requests.
Auto Trait Implementations§
impl !RefUnwindSafe for UserAck
impl !UnwindSafe for UserAck
impl Freeze for UserAck
impl Send for UserAck
impl Sync for UserAck
impl Unpin for UserAck
impl UnsafeUnpin for UserAck
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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<T> ErasedDestructor for Twhere
T: 'static,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> 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