mqtt-typed-client-macros

Crates.iomqtt-typed-client-macros
lib.rsmqtt-typed-client-macros
version0.1.0
created_at2025-07-27 14:13:43.127057+00
updated_at2025-07-27 14:13:43.127057+00
descriptionProcedural macros for type-safe async MQTT client with automatic topic routing
homepage
repositoryhttps://github.com/holovskyi/mqtt-typed-client
max_upload_size
id1770117
size135,805
Artem Holovskyi (holovskyi)

documentation

README

MQTT Typed Client Macros

Procedural macros for type-safe async MQTT client with automatic topic routing.

This crate provides the #[mqtt_topic] macro that generates type-safe MQTT topic handling code.

Usage

This crate is typically used through the main mqtt-typed-client crate. The macro is re-exported for convenient access.

use mqtt_typed_client_macros::mqtt_topic;

#[mqtt_topic("sensors/{sensor_id}/data")]
struct SensorData {
    sensor_id: String,
    payload: MyData,
}

The macro generates:

  • Subscription and publishing methods
  • Topic parameter extraction
  • Type-safe topic pattern validation
  • Integration with MQTT client

See the main mqtt-typed-client crate for complete examples and documentation.

License

This project is licensed under either of

at your option.

Commit count: 0

cargo fmt