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

17 lines
340 B
Rust
Raw Normal View History

use actix_web::{web, App, HttpRequest, Responder};
2019-12-28 17:15:22 +01:00
async fn show_users(_req: HttpRequest) -> impl Responder {
"unimplemented!"
}
#[rustfmt::skip]
// <scope>
2019-12-28 17:15:22 +01:00
#[actix_rt::main]
async fn main() {
App::new()
.service(
web::scope("/users")
.route("/show", web::get().to(show_users)));
}
// </scope>