Skip to main content

Crate mqtt_client

Crate mqtt_client 

Source
Expand description

mqtt-client — an MQTT 3.1.1 / MQTT 5.0 client written in Rust, exposed to other languages (Kotlin, Swift, and Python) via UniFFI.

The protocol module is a pure, allocation-friendly codec for the MQTT wire format with no networking dependencies; client builds an async, tokio-based client on top of it. The mqtt-broker crate re-uses protocol directly instead of duplicating the codec.

Re-exports§

pub use client::ConnectOptions;
pub use client::ConnectResult;
pub use client::MqttAuthHandler;
pub use client::MqttClient;
pub use client::MqttMessage;
pub use client::MqttMessageListener;
pub use client::TlsOptions;
pub use client::WillOptions;
pub use error::MqttError;
pub use protocol::MqttVersion;
pub use protocol::QoS;

Modules§

client
Async, tokio-based MQTT client built on top of crate::protocol.
error
Error types shared across the MQTT client (and re-used by the broker crate for the protocol codec it embeds).
protocol
MQTT wire protocol: packet encoding/decoding for both MQTT 3.1.1 and MQTT 5.0.
support
Small cross-crate support utilities shared by mqtt-client, mqtt-broker and the language-binding crates.

Macros§

redacted_debug
Implements Debug for a struct, printing the listed fields normally and the secret fields as <redacted>.