axum routing Router
axum::routing::Router
- router type can compose handler(methods) and services.
let routes = Router::new().route(
"/hello", // path
axum::routhing::get(|| async { // method router
Html("hello world")
}),
);
axum::routing::Router
let routes = Router::new().route(
"/hello", // path
axum::routhing::get(|| async { // method router
Html("hello world")
}),
);
GET
method#