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
Performs the conversion.
sourceimpl From<Disconnect> for Packet
impl From<Disconnect> for Packet
sourcefn from(original: Disconnect) -> Packet
fn from(original: Disconnect) -> Packet
Performs the conversion.
sourceimpl From<PublishAck> for Packet
impl From<PublishAck> for Packet
sourcefn from(original: PublishAck) -> Packet
fn from(original: PublishAck) -> Packet
Performs the conversion.
sourceimpl From<PublishAck2> for Packet
impl From<PublishAck2> for Packet
sourcefn from(original: PublishAck2) -> Packet
fn from(original: PublishAck2) -> Packet
Performs the conversion.
sourceimpl From<SubscribeAck> for Packet
impl From<SubscribeAck> for Packet
sourcefn from(original: SubscribeAck) -> Packet
fn from(original: SubscribeAck) -> Packet
Performs the conversion.
sourceimpl From<Unsubscribe> for Packet
impl From<Unsubscribe> for Packet
sourcefn from(original: Unsubscribe) -> Packet
fn from(original: Unsubscribe) -> Packet
Performs the conversion.
sourceimpl From<UnsubscribeAck> for Packet
impl From<UnsubscribeAck> for Packet
sourcefn from(original: UnsubscribeAck) -> Packet
fn from(original: UnsubscribeAck) -> Packet
Performs the conversion.
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 T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
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<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more