Struct ntex_mqtt::v3::PublishBuilder
source · [−]pub struct PublishBuilder { /* private fields */ }
Implementations
sourceimpl PublishBuilder
impl PublishBuilder
sourcepub fn packet_id(self, id: u16) -> Self
pub fn packet_id(self, id: u16) -> Self
Set packet id.
Note: if packet id is not set, it gets generated automatically. Packet id management should not be mixed, it should be auto-generated or set by user. Otherwise collisions could occure.
panics if id is 0
sourcepub fn dup(self, val: bool) -> Self
pub fn dup(self, val: bool) -> Self
this might be re-delivery of an earlier attempt to send the Packet.
pub fn retain(self) -> Self
sourcepub fn send_at_most_once(self) -> Result<(), SendPacketError>
pub fn send_at_most_once(self) -> Result<(), SendPacketError>
Send publish packet with QoS 0
sourcepub fn send_at_least_once(
self
) -> impl Future<Output = Result<(), SendPacketError>>
pub fn send_at_least_once(
self
) -> impl Future<Output = Result<(), SendPacketError>>
Send publish packet with QoS 1
Auto Trait Implementations
impl !RefUnwindSafe for PublishBuilder
impl !Send for PublishBuilder
impl !Sync for PublishBuilder
impl Unpin for PublishBuilder
impl !UnwindSafe for PublishBuilder
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more