axum/axum-macros/tests/from_request/pass/state_infer_parts.rs
2024-11-26 18:04:01 +00:00

18 lines
328 B
Rust

use axum::extract::State;
use axum_macros::FromRequestParts;
#[derive(FromRequestParts)]
struct Extractor {
inner_state: State<AppState>,
}
#[derive(Clone)]
struct AppState {}
fn assert_from_request()
where
Extractor: axum::extract::FromRequestParts<AppState, Rejection = axum::response::Response>,
{
}
fn main() {}