Skip to main content

controller

Attribute Macro controller 

Source
#[controller]
Expand description

The #[controller] macro is your starting point for defining a route group.

It takes a base path (like "/users") and attaches it to your struct. Behind the scenes, this implements the ControllerBasePath trait, which NestForge uses later to mount your routes at the right URL.