pub struct Publish {
pub dup: bool,
pub retain: bool,
pub qos: QoS,
pub topic: ByteString,
pub packet_id: Option<NonZeroU16>,
pub payload: Bytes,
pub properties: Option<PublishProperties>,
pub delay_interval: Option<u32>,
pub create_time: Option<i64>,
}Expand description
MQTT PUBLISH packet structure
Fields§
§dup: boolDuplicate delivery flag
retain: boolRetain message flag
qos: QoSQuality of Service level
topic: ByteStringTopic name to publish to
packet_id: Option<NonZeroU16>Packet identifier (required for QoS 1 and 2)
payload: BytesMessage payload
properties: Option<PublishProperties>MQTT 5.0 properties (None for MQTT 3.1.1)
delay_interval: Option<u32>Delayed publish interval in seconds
create_time: Option<i64>Message creation timestamp
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Publish
impl<'de> Deserialize<'de> for Publish
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for Publish
impl StructuralPartialEq for Publish
Auto Trait Implementations§
impl !Freeze for Publish
impl RefUnwindSafe for Publish
impl Send for Publish
impl Sync for Publish
impl Unpin for Publish
impl UnwindSafe for Publish
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