🏰 Stately Derive
Procedural macros for the Stately state management framework
This crate provides the procedural macros used by stately. You typically don't need to depend on this crate directly - it's re-exported by the main stately crate.
Macros
#[stately::entity]
Derives the StateEntity trait for a struct, enabling it to be managed by Stately.
Attributes:
#[stately(singleton)]- Mark as singleton entity#[stately(name_field = "field_name")]- Use different field for name#[stately(description_field = "field_name")]- Use field for description#[stately(description = "text")]- Static description
#[stately::state]
Generates application state with entity collections and CRUD operations.
API Generation:
Generates:
- REST API handlers
- OpenAPI documentation
- Type-safe request/response types
- Router and state wrappers
Documentation
For complete documentation and examples, see the stately crate.
License
Licensed under the Apache License, Version 2.0. See LICENSE for details.