Skip to main content

Module net_mqtt

Module net_mqtt 

Source
Expand description

Blocking MQTT 3.1.1 client with safe callback.

Client wraps the oveRTOS MQTT handle with automatic cleanup and a safe Rust fn(&str, &[u8]) message callback. The trampoline pattern (same as crate::timer::Timer) converts the C callback into a safe Rust function call.

Works in both heap and zero-heap modes.

§Async alternative

For async MQTT on top of crate::async_net use the rust-mqtt crate from crates.io. Supports MQTT 3.1.1 and 5.0, QoS 0/1/2, no_std mode. See crate::async_net’s module docs for the full pairing recipe.

Structs§

Client
MQTT 3.1.1 client.
ClientStorage
Backing storage for an MQTT client in zero-heap mode.
Config
MQTT connection configuration.

Enums§

Qos
MQTT Quality of Service level.

Type Aliases§

MessageFn
Message callback – topic as &str (UTF-8 per MQTT spec), payload as &[u8].