#[nest]Expand description
Prepends a path prefix to all handlers using routing macros inside the attached module.
§Syntax
#[nest("/prefix")]
mod api {
    // ...
}§Arguments
- "/prefix"- Raw literal string to be prefixed onto contained handlers’ paths.
§Example
#[nest("/api")]
mod api {
    #[get("/hello")]
    pub async fn hello() -> impl IntoResponse {
        // this has path /api/hello
        "Hello, world!"
    }
}