Struct ntex_mqtt::v3::PublishBuilder
source · 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 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