Skip to main content

Controller

Attribute Macro Controller 

Source
#[Controller]
Expand description

#[Controller("/prefix", tags(..))] — declare an HTTP controller.

Applied to an impl block, it turns each #[Get]/#[Post]/… method into a route mounted under the prefix and sharing the one request pipeline.