Skip to main content

endpoint

Attribute Macro endpoint 

Source
#[endpoint]
Expand description

Generates one HTTP Endpoint provider from handler route attributes.

Supported handler attributes are get, post, put, patch, delete, head, and options. Each accepts a stable route ID and path. One or more middleware attributes may name async provider methods that run before the handler and its typed request extractors. Middleware on the impl applies to every route before route-specific middleware.