pub enum Packet {
Show 15 variants
Connect(Box<Connect>),
ConnectAck(Box<ConnectAck>),
Publish(Publish),
PublishAck(PublishAck),
PublishReceived(PublishAck),
PublishRelease(PublishAck2),
PublishComplete(PublishAck2),
Subscribe(Subscribe),
SubscribeAck(SubscribeAck),
Unsubscribe(Unsubscribe),
UnsubscribeAck(UnsubscribeAck),
PingRequest,
PingResponse,
Disconnect(Disconnect),
Auth(Auth),
}
Expand description
MQTT Control Packets
Variants§
Connect(Box<Connect>)
Client request to connect to Server
ConnectAck(Box<ConnectAck>)
Connect acknowledgment
Publish(Publish)
Publish message
PublishAck(PublishAck)
Publish acknowledgment
PublishReceived(PublishAck)
Publish received (assured delivery part 1)
PublishRelease(PublishAck2)
Publish release (assured delivery part 2)
PublishComplete(PublishAck2)
Publish complete (assured delivery part 3)
Subscribe(Subscribe)
Client subscribe request
SubscribeAck(SubscribeAck)
Subscribe acknowledgment
Unsubscribe(Unsubscribe)
Unsubscribe request
UnsubscribeAck(UnsubscribeAck)
Unsubscribe acknowledgment
PingRequest
PING request
PingResponse
PING response
Disconnect(Disconnect)
Disconnection is advertised
Auth(Auth)
Auth exchange
Implementations§
Trait Implementations§
source§impl From<Box<ConnectAck>> for Packet
impl From<Box<ConnectAck>> for Packet
source§fn from(pkt: Box<ConnectAck>) -> Self
fn from(pkt: Box<ConnectAck>) -> Self
Converts to this type from the input type.
source§impl From<ConnectAck> for Packet
impl From<ConnectAck> for Packet
source§fn from(pkt: ConnectAck) -> Self
fn from(pkt: ConnectAck) -> Self
Converts to this type from the input type.
source§impl From<Disconnect> for Packet
impl From<Disconnect> for Packet
source§fn from(pkt: Disconnect) -> Self
fn from(pkt: Disconnect) -> Self
Converts to this type from the input type.
source§impl From<PublishAck> for Packet
impl From<PublishAck> for Packet
source§fn from(pkt: PublishAck) -> Self
fn from(pkt: PublishAck) -> Self
Converts to this type from the input type.
source§impl From<SubscribeAck> for Packet
impl From<SubscribeAck> for Packet
source§fn from(pkt: SubscribeAck) -> Self
fn from(pkt: SubscribeAck) -> Self
Converts to this type from the input type.
source§impl From<Unsubscribe> for Packet
impl From<Unsubscribe> for Packet
source§fn from(pkt: Unsubscribe) -> Self
fn from(pkt: Unsubscribe) -> Self
Converts to this type from the input type.
source§impl From<UnsubscribeAck> for Packet
impl From<UnsubscribeAck> for Packet
source§fn from(pkt: UnsubscribeAck) -> Self
fn from(pkt: UnsubscribeAck) -> Self
Converts to this type from the input type.
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
)