mirror of
https://github.com/tokio-rs/axum.git
synced 2026-08-18 00:00:15 +02:00
Co-authored-by: Jonas Platte <[email protected]> Co-authored-by: Michael Scofield <[email protected]>
13 lines
252 B
Rust
13 lines
252 B
Rust
use axum::{routing::get, Extension, Router};
|
|
use axum_macros::FromRequest;
|
|
|
|
#[derive(FromRequest, Clone)]
|
|
#[from_request(via(Extension))]
|
|
enum Extractor {}
|
|
|
|
async fn foo(_: Extractor) {}
|
|
|
|
fn main() {
|
|
_ = Router::<()>::new().route("/", get(foo));
|
|
}
|