Expand description
Derive macros for AimDB record key types
This crate provides the #[derive(RecordKey)] macro for defining
compile-time checked record keys with optional connector metadata.
§Example
ⓘ
use aimdb_derive::RecordKey;
// Note: Hash is auto-generated by the derive macro to satisfy the Borrow<str> contract
#[derive(RecordKey, Clone, Copy, PartialEq, Eq)]
pub enum AppKey {
#[key = "temp.indoor"]
#[link_address = "mqtt://sensors/temp/indoor"]
TempIndoor,
#[key = "temp.outdoor"]
#[link_address = "knx://9/1/0"]
TempOutdoor,
}Derive Macros§
- Record
Key - Derive the
RecordKeytrait for an enum