Enum ntex_mqtt::v3::codec::Packet[][src]

pub enum Packet {
Show 14 variants Connect(Box<Connect>), ConnectAck { session_present: bool, return_code: ConnectAckReason, }, 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

Client request to connect to Server

Tuple Fields of Connect

0: Box<Connect>
ConnectAck

Connect acknowledgment

Fields of ConnectAck

session_present: bool

enables a Client to establish whether the Client and Server have a consistent view about whether there is already stored Session state.

return_code: ConnectAckReason
Publish

Publish message

Tuple Fields of Publish

0: Publish
PublishAck

Publish acknowledgment

Fields of PublishAck

packet_id: NonZeroU16

Packet Identifier

PublishReceived

Publish received (assured delivery part 1)

Fields of PublishReceived

packet_id: NonZeroU16

Packet Identifier

PublishRelease

Publish release (assured delivery part 2)

Fields of PublishRelease

packet_id: NonZeroU16

Packet Identifier

PublishComplete

Publish complete (assured delivery part 3)

Fields of PublishComplete

packet_id: NonZeroU16

Packet Identifier

Subscribe

Client subscribe request

Fields of Subscribe

packet_id: NonZeroU16

Packet Identifier

topic_filters: Vec<(ByteString, QoS)>

the list of Topic Filters and QoS to which the Client wants to subscribe.

SubscribeAck

Subscribe acknowledgment

Fields of SubscribeAck

packet_id: NonZeroU16status: Vec<SubscribeReturnCode>

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

Unsubscribe

Unsubscribe request

Fields of Unsubscribe

packet_id: NonZeroU16

Packet Identifier

topic_filters: Vec<ByteString>

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

UnsubscribeAck

Unsubscribe acknowledgment

Fields of UnsubscribeAck

packet_id: NonZeroU16

Packet Identifier

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

Performs the conversion.

Performs the conversion.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

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

Performs the conversion.

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

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

Performs the conversion.

Should always be Self

The resulting type after obtaining ownership.

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

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

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.