pub struct PublishBuilder { /* private fields */ }Implementations§
Source§impl 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.
Sourcepub fn streaming(self, size: u32) -> (StreamingPublishBuilder, StreamingPayload)
pub fn streaming(self, size: u32) -> (StreamingPublishBuilder, StreamingPayload)
Create streamimng publish builder
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
Sourcepub fn send_at_least_once_no_block(self) -> Result<(), SendPacketError>
pub fn send_at_least_once_no_block(self) -> Result<(), SendPacketError>
Non-blocking send publish packet with QoS 1
Panics if sink is not ready or publish ack callback is not set
Sourcepub fn send_exactly_once(
self,
) -> impl Future<Output = Result<PublishReceived, SendPacketError>>
pub fn send_exactly_once( self, ) -> impl Future<Output = Result<PublishReceived, SendPacketError>>
Send publish packet with QoS 2
Auto Trait Implementations§
impl Freeze for PublishBuilder
impl !RefUnwindSafe for PublishBuilder
impl !Send for PublishBuilder
impl !Sync for PublishBuilder
impl Unpin for PublishBuilder
impl !UnwindSafe for PublishBuilder
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