Skip to main content

Crate blazingly_macros

Crate blazingly_macros 

Source
Expand description

§blazingly-macros

Procedural macros for Blazingly operation, model, and error declarations.

This crate provides #[operation] and its method aliases (#[get], #[head], #[post], #[put], #[patch], #[delete], #[options], #[trace], #[connect]), #[api_model], #[api_error], #[provider], #[security], and the MCP #[tool] attribute.

It is internal plumbing, not a standalone library. The generated code names paths under ::blazingly, so it only compiles inside a crate that depends on the blazingly facade. Do not depend on blazingly-macros directly: depend on blazingly, which re-exports every macro (blazingly::get, blazingly::api_model, blazingly::mcp::tool, and so on) alongside the runtime types the expansions refer to. For that reason this page carries no usage example; see the getting-started guide for the macros in context.

Attribute Macros§

api_error
Declares a stable domain error as an enum.
api_model
Declares an API model.
connect
Declares a CONNECT operation. See get for the argument form.
delete
Declares a DELETE operation. See get for the argument form.
get
Declares a GET operation.
head
Declares a HEAD operation. See get for the argument form.
operation
Defines an operation using an explicit HTTP method.
options
Declares an OPTIONS operation. See get for the argument form.
patch
Declares a PATCH operation. See get for the argument form.
post
Declares a POST operation. See get for the argument form.
provider
Turns a typed factory function into a compiled DI provider declaration.
put
Declares a PUT operation. See get for the argument form.
security
Requires a registered security scheme, and optionally scopes, for an operation.
tool
Exposes an operation as a native MCP tool.
trace
Declares a TRACE operation. See get for the argument form.