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
sourceimpl Packet
impl Packet
pub fn packet_type(&self) -> u8
Trait Implementations
sourceimpl From<Box<ConnectAck, Global>> for Packet
impl From<Box<ConnectAck, Global>> for Packet
sourcefn from(original: Box<ConnectAck>) -> Packet
fn from(original: Box<ConnectAck>) -> Packet
Converts to this type from the input type.
sourceimpl From<Disconnect> for Packet
impl From<Disconnect> for Packet
sourcefn from(original: Disconnect) -> Packet
fn from(original: Disconnect) -> Packet
Converts to this type from the input type.
sourceimpl From<PublishAck> for Packet
impl From<PublishAck> for Packet
sourcefn from(original: PublishAck) -> Packet
fn from(original: PublishAck) -> Packet
Converts to this type from the input type.
sourceimpl From<PublishAck2> for Packet
impl From<PublishAck2> for Packet
sourcefn from(original: PublishAck2) -> Packet
fn from(original: PublishAck2) -> Packet
Converts to this type from the input type.
sourceimpl From<SubscribeAck> for Packet
impl From<SubscribeAck> for Packet
sourcefn from(original: SubscribeAck) -> Packet
fn from(original: SubscribeAck) -> Packet
Converts to this type from the input type.
sourceimpl From<Unsubscribe> for Packet
impl From<Unsubscribe> for Packet
sourcefn from(original: Unsubscribe) -> Packet
fn from(original: Unsubscribe) -> Packet
Converts to this type from the input type.
sourceimpl From<UnsubscribeAck> for Packet
impl From<UnsubscribeAck> for Packet
sourcefn from(original: UnsubscribeAck) -> Packet
fn from(original: UnsubscribeAck) -> Packet
Converts to this type from the input type.
impl Eq for Packet
impl StructuralEq for Packet
impl StructuralPartialEq for Packet
Auto Trait Implementations
impl !RefUnwindSafe for Packet
impl Send for Packet
impl Sync for Packet
impl Unpin for Packet
impl !UnwindSafe for Packet
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.