[][src]Crate rumq_client

Structs

Connack
Connect
LastWill
MqttEventLoop
MqttOptions

Mqtt options

PacketIdentifier
Publish
Suback
Subscribe
SubscribeTopic
Unsubscribe

Enums

ConnectReturnCode
Error
Notification

Incoming notifications from the broker

Packet
PacketType
Protocol
QoS
ReconnectOptions

Control how the connection is re-established if it is lost.

SecurityOptions

Client authentication option for mqtt connect packet

SubscribeReturnCodes

Traits

MqttRead
MqttWrite

Functions

connack
connect
connect_return
eventloop

Connects to the server and returs an object which encompasses state of the connection. Use this to create an stream and poll it with tokio The choice of separating MqttEventLoop and stream methods is to get access to the internal state after the work with the stream is done. This is useful in scenarios like shutdown where the current state should be persisted and passed back to the stream as a Stream First connection is done here instead of the stream to initialize network directly without Option and to have good error code for failured. If using an encapsulated struct with connection parameters (with state inside MqttEventLoop) and handling indermediate critical errors (like intermediate authorization failure after initial success)

packet_type
publish
qos

7 3 0 +--------------------------+--------------------------+ byte 1 | MQTT Control Packet Type | Flags for each type | +--------------------------+--------------------------+ | Remaining Bytes Len (1 - 4 bytes) | +-----------------------------------------------------+

subscribe