Expand description
§mqtt-service
This crate provides a convenient support for the MQTT Response-Pattern. It uses the rumqttc library to connect to the MQTT broker.
Note: this crate is feature complete, and few changes are expected.
§How to use
cargo add mqtt-service
let connection = mqtt_service::Connection::new("name-of-the-client", "localhost", 1883);
let r = connection.call_service("name/of/service" "Some data");
let res = futures::executor::block_on(r.unwrap());
println!("Result is '{res:?}'");
Structs§
- Client
- Handle to the connection