Attribute Macros§
- dsl
- Add
#[dsl]to your structs with#[table]to interact in a more ergonomic way than SpacetimeDB allows you by default. - hook
- Add
#[hook]to your functions to add the trait implementation line required for SpacetimeDSL hooks to work.
Derive Macros§
- SpacetimeDSL
- Declares the field attributes
#[dsl]reads as helper attributes, so the compiler accepts them on the fields: an attribute macro cannot declare helper attributes, a derive can.