Enum sage_mqtt::Packet[][src]

pub enum Packet {
Show 15 variants Connect(Connect), ConnAck(ConnAck), Publish(Publish), PubAck(PubAck), PubRec(PubRec), PubRel(PubRel), PubComp(PubComp), Subscribe(Subscribe), SubAck(SubAck), UnSubscribe(UnSubscribe), UnSubAck(UnSubAck), PingReq, PingResp, Disconnect(Disconnect), Auth(Auth),
}
Expand description

The standard type to manipulate a AsyncRead/AsyncWrite-able MQTT packet. Each packet is an enum value with its own type.

Variants

Connect(Connect)

CONNECT MQTT packet. Opens a connection request.

Tuple Fields of Connect

0: Connect
ConnAck(ConnAck)

CONNACK MQTT packet. Aknowledge a connectio request.

Tuple Fields of ConnAck

0: ConnAck
Publish(Publish)

PUBLISH MQTT packet. Delivery a message to or from a server.

Tuple Fields of Publish

0: Publish
PubAck(PubAck)

PUBACK MQTT packet. Ackowledge a QoS 1 or QoS 2 message.

Tuple Fields of PubAck

0: PubAck
PubRec(PubRec)

PUBREC MQTT packet. Ackowledge a QoS 2 message.

Tuple Fields of PubRec

0: PubRec
PubRel(PubRel)

PUBREL MQTT packet. Ackowledge a QoS 2 message.

Tuple Fields of PubRel

0: PubRel
PubComp(PubComp)

PUBCOMP MQTT packet. Ackowledge a QoS 2 message.

Tuple Fields of PubComp

0: PubComp
Subscribe(Subscribe)

SUBSCRIBE MQTT packet. Subscribe a client to topics.

Tuple Fields of Subscribe

0: Subscribe
SubAck(SubAck)

SUBACK MQTT packet. Acknowledge a client SUBSCRIBE packet.

Tuple Fields of SubAck

0: SubAck
UnSubscribe(UnSubscribe)

UNSUBSCRIBE MQTT packet. Unsubscribe a client from topics.

Tuple Fields of UnSubscribe

0: UnSubscribe
UnSubAck(UnSubAck)

UNSUBACK MQTT packet. Acknowledge a client UNSUBSCRIBE packet.

Tuple Fields of UnSubAck

0: UnSubAck
PingReq

PINGREQ MQTT packet. Send a ping request.

PingResp

PINGRESP MQTT packet. Respond to a ping request.

Disconnect(Disconnect)

DISCONNECT MQTT packet. Disconnect a connextion and optionally a session.

Tuple Fields of Disconnect

0: Disconnect
Auth(Auth)

AUTH MQTT packet. Performs authentication exchanges between clients and server.

Tuple Fields of Auth

0: Auth

Implementations

Write the entire Packet to writer, returning the number of bytes written. In case of failure, the operation will return any MQTT-related error, or std::io::Error.

Read a control packet from reader, returning a new Packet. In case of failure, the operation will return any MQTT-related error, or std::io::Error.

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

Formats the value using the given formatter. Read more

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

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.

Performs the conversion.

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

Converts the given value to a String. 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.