Enum ntex_mqtt::v5::codec::Packet

source ·
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§

source§

impl Packet

source

pub fn packet_type(&self) -> u8

Trait Implementations§

source§

impl Clone for Packet

source§

fn clone(&self) -> Packet

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Packet

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl From<Auth> for Packet

source§

fn from(pkt: Auth) -> Self

Converts to this type from the input type.
source§

impl From<Box<Connect>> for Packet

source§

fn from(pkt: Box<Connect>) -> Self

Converts to this type from the input type.
source§

impl From<Box<ConnectAck>> for Packet

source§

fn from(pkt: Box<ConnectAck>) -> Self

Converts to this type from the input type.
source§

impl From<Connect> for Packet

source§

fn from(pkt: Connect) -> Self

Converts to this type from the input type.
source§

impl From<ConnectAck> for Packet

source§

fn from(pkt: ConnectAck) -> Self

Converts to this type from the input type.
source§

impl From<Disconnect> for Packet

source§

fn from(pkt: Disconnect) -> Self

Converts to this type from the input type.
source§

impl From<Publish> for Packet

source§

fn from(pkt: Publish) -> Self

Converts to this type from the input type.
source§

impl From<PublishAck> for Packet

source§

fn from(pkt: PublishAck) -> Self

Converts to this type from the input type.
source§

impl From<Subscribe> for Packet

source§

fn from(pkt: Subscribe) -> Self

Converts to this type from the input type.
source§

impl From<SubscribeAck> for Packet

source§

fn from(pkt: SubscribeAck) -> Self

Converts to this type from the input type.
source§

impl From<Unsubscribe> for Packet

source§

fn from(pkt: Unsubscribe) -> Self

Converts to this type from the input type.
source§

impl From<UnsubscribeAck> for Packet

source§

fn from(pkt: UnsubscribeAck) -> Self

Converts to this type from the input type.
source§

impl PartialEq for Packet

source§

fn eq(&self, other: &Packet) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Eq for Packet

source§

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> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> WithSubscriber for T

source§

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
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more