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