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
Illustrative (not compiled: the generated impl targets aimdb_core’s
RecordKey trait, a circular dev-dependency for this proc-macro crate —
compiled integration tests live in aimdb-core):
ⓘ
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,
}Macros§
- migration_
chain - Variable-arity replacement for
aimdb-data-contracts’s old 3-armmacro_rules! migration_chain. Re-exported asaimdb_data_contracts::migration_chain!— see that crate’smigratablefeature andmigratable.rsfor the user-facing grammar and docs.