Skip to main content

Crate typeway_macros

Crate typeway_macros 

Source
Expand description

typeway-macros — proc macros for the Typeway web framework.

Provides typeway_path! for ergonomic path type construction, typeway_api! for defining complete API types with inline routes, and #[handler] for validating handler functions at the definition site.

Macros§

endpoint
Defines an endpoint type with builder-style options.
path
Constructs a path type expression. Unlike typeway_path!, this does NOT generate marker types — it references markers that were already defined by a typeway_path! or typeway_api! invocation.
typeway_api
Defines a complete API type with inline route definitions.
typeway_path
Defines a path type with auto-generated literal segment markers.

Attribute Macros§

api_description
Defines an API as a trait, generating endpoint types and a Serves bridge.
documented_handler
Extracts doc comments from a handler function and generates a companion const of type HandlerDoc (from typeway_core) containing the summary, description, operation ID, and tags.
handler
Validates a handler function at its definition site.

Derive Macros§

ToProtoType
Derives a ToProtoType implementation for a struct with named fields.
TypestateBuilder
Derive a typestate builder for a struct.
TypewayCodec
Derive TypewayEncode and TypewayDecode for a struct.
TypewaySchema
Derives a ToSchema implementation for a struct with named fields.