mirror of
https://github.com/tokio-rs/axum.git
synced 2024-12-20 05:25:17 +01:00
13 lines
262 B
Rust
13 lines
262 B
Rust
|
use axum::{body::Body, routing::get, Extension, Router};
|
||
|
use axum_macros::FromRequest;
|
||
|
|
||
|
#[derive(FromRequest, Clone)]
|
||
|
#[from_request(via(Extension))]
|
||
|
enum Extractor {}
|
||
|
|
||
|
async fn foo(_: Extractor) {}
|
||
|
|
||
|
fn main() {
|
||
|
Router::<Body>::new().route("/", get(foo));
|
||
|
}
|