use axum::{ extract::{FromRequestParts, Query, rejection::QueryRejection}, http::request::Parts, }; use crate::ErrorResponse; pub struct ApiQuery(pub T); impl FromRequestParts for ApiQuery where Query: FromRequestParts, S: Send + Sync, { type Rejection = ErrorResponse; #[inline] async fn from_request_parts(parts: &mut Parts, state: &S) -> Result { Ok(Self(Query::from_request_parts(parts, state).await?.0)) } }