pub enum Packet {
Show 14 variants
Connect(Box<Connect>),
ConnectAck(ConnectAck),
Publish(Publish),
PublishAck {
packet_id: NonZeroU16,
},
PublishReceived {
packet_id: NonZeroU16,
},
PublishRelease {
packet_id: NonZeroU16,
},
PublishComplete {
packet_id: NonZeroU16,
},
Subscribe {
packet_id: NonZeroU16,
topic_filters: Vec<(ByteString, QoS)>,
},
SubscribeAck {
packet_id: NonZeroU16,
status: Vec<SubscribeReturnCode>,
},
Unsubscribe {
packet_id: NonZeroU16,
topic_filters: Vec<ByteString>,
},
UnsubscribeAck {
packet_id: NonZeroU16,
},
PingRequest,
PingResponse,
Disconnect,
}
Expand description
MQTT Control Packets
Variants§
Connect(Box<Connect>)
Client request to connect to Server
ConnectAck(ConnectAck)
Connect acknowledgment
Publish(Publish)
Publish message
PublishAck
Publish acknowledgment
Fields
§
packet_id: NonZeroU16
Packet Identifier
PublishReceived
Publish received (assured delivery part 1)
Fields
§
packet_id: NonZeroU16
Packet Identifier
PublishRelease
Publish release (assured delivery part 2)
Fields
§
packet_id: NonZeroU16
Packet Identifier
PublishComplete
Publish complete (assured delivery part 3)
Fields
§
packet_id: NonZeroU16
Packet Identifier
Subscribe
Client subscribe request
Fields
§
packet_id: NonZeroU16
Packet Identifier
§
topic_filters: Vec<(ByteString, QoS)>
the list of Topic Filters and QoS to which the Client wants to subscribe.
SubscribeAck
Subscribe acknowledgment
Fields
§
packet_id: NonZeroU16
§
status: Vec<SubscribeReturnCode>
corresponds to a Topic Filter in the SUBSCRIBE Packet being acknowledged.
Unsubscribe
Unsubscribe request
Fields
§
packet_id: NonZeroU16
Packet Identifier
§
topic_filters: Vec<ByteString>
the list of Topic Filters that the Client wishes to unsubscribe from.
UnsubscribeAck
Unsubscribe acknowledgment
Fields
§
packet_id: NonZeroU16
Packet Identifier
PingRequest
PING request
PingResponse
PING response
Disconnect
Client is disconnecting
Implementations§
Trait Implementations§
impl Eq for Packet
impl StructuralPartialEq for Packet
Auto Trait Implementations§
impl Freeze for Packet
impl !RefUnwindSafe for Packet
impl Send for Packet
impl Sync for Packet
impl Unpin for Packet
impl !UnwindSafe for Packet
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)