This page is the index of every decorator the framework ships, grouped
by concern. Skim the table for the one you need, click through to the
page that explains it in context. Each row says where the decorator
goes (struct, impl block, method, field) so you can confirm the
position without leaving the page.
| Decorator | Goes on | Summary | Read more |
|---|
#[module] | struct | Composes a binary: lists providers it owns and imports it depends on | Modules |
#[injectable] | struct | Marks a provider built from the container, with optional scope = request | transient | Providers |
#[inject] | field | Resolves the field from the container at construction | Providers |
#[hooks] | impl block | Orchestrates lifecycle methods on a provider | Lifecycle |
#[on_module_init] | method | Runs once after wiring, before serving | Lifecycle |
#[on_application_bootstrap] | method | Runs once after every module init, before serving | Lifecycle |
#[on_module_destroy] | method | Runs on shutdown after transports stop | Lifecycle |
#[before_application_shutdown] | method | Runs before the application begins shutting down | Lifecycle |
#[on_application_shutdown] | method | Runs last during shutdown, best-effort | Lifecycle |
| Decorator | Goes on | Summary | Read more |
|---|
#[controller] | struct | Mounts the struct as a controller with a base path and optional version | Controllers |
#[routes] | impl block | Wires methods to HTTP routes and emits the route table | Controllers |
#[get] #[post] #[put] #[patch] #[delete] | method | Binds the method to an HTTP verb at the given path | Controllers |
#[http_code] | method | Overrides the default response status code | Responses |
#[response_header] | method | Appends a response header (repeatable) | Responses |
#[redirect] | method | Issues a redirect and discards the handler payload | Responses |
#[use_guards] | struct or method | Binds container-resolved Guards, first listed outermost | Guards |
#[use_interceptors] | struct or method | Binds container-resolved Interceptors | Interceptors |
#[use_filters] | struct or method | Binds error-mapping Filters (response mapping; the global pool runs at the transport band) | Exception filters |
#[use_exception_filters] | struct or method | Binds typed ExceptionFilters — downcast catch, the layer closest to the handler | Exception filters |
#[meta] | method | Attaches typed metadata read back via Reflector (repeatable) | Guards |
#[public] | method | Marks the route public so auth guards skip it | Guards |
#[interceptor] | struct | Marks a struct as a global HTTP interceptor | Interceptors |
#[input] | struct | Shorthand for input DTOs (Deserialize + Validate + deny_unknown_fields) | Extractors |
| Decorator | Goes on | Summary | Read more |
|---|
#[resolver] | struct + impl block | Marks a resolver provider and orchestrates its operations | GraphQL |
#[query] | method | Root query operation; requires an access posture (#[authorize] or #[public]) | Queries and mutations |
#[mutation] | method | Root mutation operation; requires an access posture (#[authorize] or #[public]) | Queries and mutations |
#[authorize] | method | Access posture: gates the operation by ability (Action, Entity) and masks the response | Queries and mutations |
#[public] | method | Access posture: deliberately ungated operation — no gate, no mask | Queries and mutations |
#[field_resolver] | method | Custom field resolver on a wire type; takes no posture attribute | Field resolvers |
#[dataloader] | impl block on service | Batches a method into a request-scoped DataLoader | Dataloader |
| Decorator | Goes on | Summary | Read more |
|---|
#[gateway] | struct | Mounts a WebSocket gateway at a path on the HTTP transport | WebSockets |
#[messages] | impl block | Binds gateway message handlers and lifecycle hooks | Messages |
#[subscribe_message] | method | Handles one event in the { event, data } envelope | Messages |
#[on_connect] | method | Runs after the socket upgrades | Messages |
#[on_disconnect] | method | Runs after the socket closes | Messages |
| Decorator | Goes on | Summary | Read more |
|---|
#[processor] | impl block | Orchestrates queue consumers on a provider | Queue |
#[process] | method | Binds the method to a queue with optional concurrency and retries | Queue |
| Decorator | Goes on | Summary | Read more |
|---|
#[scheduled] | impl block | Orchestrates scheduled methods on a provider | Schedule |
#[every] | method | Fires the method on a fixed interval | Schedule |
#[cron] | method | Fires the method on a cron expression, optional tz | Schedule |
#[after] | method | Fires the method once, after a delay from boot | Schedule |
| Decorator | Goes on | Summary | Read more |
|---|
#[listeners] | impl block | Orchestrates event listeners on a provider | Events |
#[on_event] | method | Subscribes the method to its second-parameter event type | Events |
| Decorator | Goes on | Summary | Read more |
|---|
#[mcp] | struct | Mounts an MCP handler over HTTP at a path | MCP |
#[tool_router] | impl block | Re-exported from rmcp: collects #[tool] methods into a router | MCP |
#[tool_handler] | impl block | Re-exported from rmcp: implements ServerHandler from the router | MCP |
#[tool] | method | Re-exported from rmcp: exposes the method as an MCP tool | MCP |
| Decorator | Goes on | Summary | Read more |
|---|
#[indicators] | impl block | Orchestrates health checks on a provider | Indicators |
#[liveness] | method | Binds the method to the liveness probe | Indicators |
#[readiness] | method | Binds the method to the readiness probe | Indicators |
#[startup] | method | Binds the method to the startup probe | Indicators |
| Decorator | Goes on | Summary | Read more |
|---|
#[config] | struct | Marks a struct as a namespaced configuration loaded from env and files | Configuration |
| Decorator | Goes on | Summary | Read more |
|---|
#[expose] | struct + field | Exposes a SeaORM entity to GraphQL and OpenAPI from one declaration | Database |
#[crud] | impl block | Generates standard CRUD operations on a controller or resolver | CRUD |
| Decorator | Goes on | Summary | Read more |
|---|
#[api] | method | Enriches the OpenAPI operation with summary, description, and tags | OpenAPI |