Skip to main contentCrate murgamu_macros
Source - html_response
- Constructs a
200 OK HTML response from an expression. - json_response
- Constructs a
200 OK JSON response from an expression. - no_content_response
- Constructs a
204 No Content response with an empty body. - ok_response
- Constructs a
200 OK response with an empty body. - text_response
- Constructs a
200 OK plain-text response from an expression.
- api
- Attaches OpenAPI metadata to a route handler.
- body
- Marks a handler parameter as the deserialized JSON request body.
- controller
- Marks an
impl block as a Murgamu controller and registers its route handlers. - delete
- Declares a route handler for
DELETE requests. - get
- Declares a route handler for
GET requests. - guard
- Marks a struct as a Murgamu route guard.
- head
- Declares a route handler for
HEAD requests. - header
- Marks a handler parameter as a request header value.
- inject
- Marks a field as an injected dependency.
- injectable
- Marks a struct as an injectable value that can be registered with
.inject(). - interceptor
- Marks a struct as a Murgamu interceptor.
- main
- Sets up the Tokio async runtime for the application entry point.
- module
- Declares a Murgamu module that groups controllers, services, and imports.
- options
- Declares a route handler for
OPTIONS requests. - param
- Marks a handler parameter as a single URL path segment.
- patch
- Declares a route handler for
PATCH requests. - pipe
- Marks a struct as a Murgamu transformation pipe.
- post
- Declares a route handler for
POST requests. - public
- Marks a route as publicly accessible, bypassing global authentication guards.
- put
- Declares a route handler for
PUT requests. - query
- Marks a handler parameter as a deserialized query string.
- queryparam
- Marks a handler parameter as a single named query string value.
- role
- Restricts a route to callers that hold one or more specific roles.
- route
- Declares a route handler for a custom or non-standard HTTP method.
- service
- Marks a struct as a Murgamu service and registers it with the DI container.
- use_pipe
- Applies a transformation pipe to a handler parameter.
- validate
- Triggers automatic validation of a handler parameter before execution.
- MurDto
- Derives a default
validate method on a DTO struct. - MurEntity
- Derives a thin entity helper on a struct.