Function axum_request_validator::middleware
source · pub async fn middleware<Validator, ErrorHandler>(
__arg0: State<(Validator, ErrorHandler)>,
req: Request<Body>,
next: Next<Body>
) -> Result<Response, <ErrorHandler as ErrorHandler<Validator::Error>>::Response>where
Validator: Validator<Bytes>,
ErrorHandler: ErrorHandler<Validator::Error>,
Expand description
axum
middleware implementation.
Pass the error handler you need to handle the validation errors.