Expand description
Proc macros for server-less.
This crate provides attribute macros that transform impl blocks into protocol handlers, and derive macros for common patterns.
Attribute Macros§
- asyncapi
- Generate AsyncAPI specification for event-driven services.
- capnp
- Generate Cap’n Proto schema from an impl block.
- cli
- Generate a CLI application from an impl block.
- connect
- Generate Connect protocol schema from an impl block.
- graphql
- Generate GraphQL schema from an impl block using async-graphql.
- graphql_
enum - Define a GraphQL enum type.
- graphql_
input - Define a GraphQL input type.
- grpc
- Generate Protocol Buffers schema from an impl block.
- http
- Generate HTTP handlers from an impl block.
- jsonrpc
- Generate JSON-RPC 2.0 handlers over HTTP.
- jsonschema
- Generate JSON Schema from an impl block.
- markdown
- Generate Markdown API documentation from an impl block.
- mcp
- Generate MCP (Model Context Protocol) tools from an impl block.
- openapi
- Generate OpenAPI specification without HTTP routing.
- openrpc
- Generate OpenRPC specification for JSON-RPC services.
- param
- Helper attribute for parameter-level HTTP customization.
- program
- Blessed preset: CLI application with Markdown docs.
- response
- Helper attribute for method-level HTTP response customization.
- route
- Helper attribute for method-level HTTP route customization.
- rpc
- Blessed preset: JSON-RPC server with OpenRPC spec and serve.
- serve
- Coordinate multiple protocol handlers into a single server.
- server
- Blessed preset: HTTP server with OpenAPI and serve.
- smithy
- Generate Smithy IDL schema from an impl block.
- thrift
- Generate Apache Thrift schema from an impl block.
- tool
- Blessed preset: MCP tools with JSON Schema.
- ws
- Generate WebSocket JSON-RPC handlers from an impl block.
Derive Macros§
- Serverless
Error - Derive macro for error types that implement
IntoErrorCode.