Enum ntex_mqtt::v3::codec::Packet

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

Fields

§packet_id: NonZeroU16

Packet Identifier

Publish acknowledgment

§

PublishReceived

Fields

§packet_id: NonZeroU16

Packet Identifier

Publish received (assured delivery part 1)

§

PublishRelease

Fields

§packet_id: NonZeroU16

Packet Identifier

Publish release (assured delivery part 2)

§

PublishComplete

Fields

§packet_id: NonZeroU16

Packet Identifier

Publish complete (assured delivery part 3)

§

Subscribe

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.

Client subscribe request

§

SubscribeAck

Fields

§packet_id: NonZeroU16
§status: Vec<SubscribeReturnCode>

corresponds to a Topic Filter in the SUBSCRIBE Packet being acknowledged.

Subscribe acknowledgment

§

Unsubscribe

Fields

§packet_id: NonZeroU16

Packet Identifier

§topic_filters: Vec<ByteString>

the list of Topic Filters that the Client wishes to unsubscribe from.

Unsubscribe request

§

UnsubscribeAck

Fields

§packet_id: NonZeroU16

Packet Identifier

Unsubscribe acknowledgment

§

PingRequest

PING request

§

PingResponse

PING response

§

Disconnect

Client is disconnecting

Implementations§

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Converts to this type from the input type.
Converts to this type from the input type.
This method tests for self and other values to be equal, and is used by ==.
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

Should always be Self
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.