Skip to main content

controller

Attribute Macro controller 

Source
#[controller]
Expand description

Generates controller metadata and backend routes for an impl block.

The required argument is a base path such as #[controller("/users")]. Methods may use #[get], #[post], #[put], #[patch], or #[delete]; extractor and guard/interceptor attributes are interpreted by the selected Actix or Axum backend. Generated code resolves controller dependencies from the caelix facade, so applications need no direct runtime dependency.