Allora Macros
Procedural macro support for registering services with the runtime inventory.
Macro: #[service]
Annotate an inherent impl block that includes a zero-arg new() constructor. The macro submits an inventory
descriptor so YAML ref-name values can wire your service.
Example (Async Service)
use ;
;
Naming
- Omit
name=to default to the type name (whitespace removed). - Use
#[service(name="custom")]to matchref-namein YAML.
Validation
- Requires inherent impl (not a trait impl).
- Requires zero-arg
new()in that impl. - Rejects generic impl blocks.
License
Apache-2.0