Struct UnsubscribeBuilder
pub struct UnsubscribeBuilder {
cmd_tx: Sender<Command>,
filters: Vec<TopicFilterBuf>,
}Expand description
Builder for unsubscribing from one or more topic filters.
Obtained via
MqttClient::unsubscribe.
Call send to get an UnsubscribeFuture that can be
awaited for UNSUBACK, or converted to a QueuedUnsubscribeFuture via
UnsubscribeFuture::queued.
Fields§
§cmd_tx: Sender<Command>§filters: Vec<TopicFilterBuf>Implementations§
Source§impl UnsubscribeBuilder
impl UnsubscribeBuilder
Sourcepub fn and(self, filter: TopicFilterBuf) -> UnsubscribeBuilder
pub fn and(self, filter: TopicFilterBuf) -> UnsubscribeBuilder
Adds an additional filter to this unsubscribe batch.
Sourcepub fn send(self) -> UnsubscribeFuture ⓘ
pub fn send(self) -> UnsubscribeFuture ⓘ
Returns an UnsubscribeFuture that drives the UNSUBSCRIBE to
completion.
No work is done until the future is first polled. Await the future to
wait for UNSUBACK, or call UnsubscribeFuture::queued to convert it
into a QueuedUnsubscribeFuture that resolves as soon as the
unsubscribe is recorded locally.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for UnsubscribeBuilder
impl RefUnwindSafe for UnsubscribeBuilder
impl Send for UnsubscribeBuilder
impl Sync for UnsubscribeBuilder
impl Unpin for UnsubscribeBuilder
impl UnsafeUnpin for UnsubscribeBuilder
impl UnwindSafe for UnsubscribeBuilder
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