Skip to main content

Crate caelix_macros

Crate caelix_macros 

Source
Expand description

Procedural macros for defining Caelix applications.

Attribute Macrosยง

context
Marks the optional [caelix::MessageContext] handler parameter.
controller
Generates controller metadata and backend routes for an impl block.
errors
Declares OpenAPI error responses for a controller handler.
event_pattern
Marks a typed JetStream event handler inside a [microservice].
gateway
Registers either an RFC 6455 impl WebSocketGateway or an Axum Socket.IO gateway implementation at the supplied path.
guard
Marks a dependency-injected struct as a route guard.
injectable
Implements caelix::Injectable for a named or unit struct.
main
Marks an async main that runs on the selected backend runtime.
message_pattern
Marks a typed Core NATS request/reply handler inside a [microservice].
microservice
Generates dependency-injected microservice metadata for an inherent impl.
on_message
Marks an async method on a Socket.IO #[gateway] implementation as an event handler.
payload
Marks the decoded message payload parameter inside a [microservice].
request_header
Declares a request-header parameter in generated OpenAPI documentation.
response
Declares an OpenAPI response for a controller handler.
security
Declares OpenAPI security requirements for a controller or route handler.
skip_throttle
Disables inherited throttling for a controller or route.
test
Marks an async test that runs on the selected backend runtime.
throttle
Applies a fixed-window policy to a controller or route.