1
0
mirror of https://github.com/actix/actix-website synced 2024-11-24 00:41:07 +01:00
actix-website/examples/application/src/scope.rs

15 lines
307 B
Rust
Raw Normal View History

2020-09-12 17:21:54 +02:00
use actix_web::{get, web, App, HttpRequest, Responder};
2020-09-12 17:21:54 +02:00
#[get("/show")]
2019-12-28 17:15:22 +01:00
async fn show_users(_req: HttpRequest) -> impl Responder {
"unimplemented!"
}
// <scope>
2020-09-12 17:21:54 +02:00
#[actix_web::main]
2019-12-28 17:15:22 +01:00
async fn main() {
2020-09-12 17:21:54 +02:00
let scope = web::scope("/users").service(show_users);
App::new().service(scope);
}
// </scope>