middleware

Function middleware 

Source
pub fn middleware<Validator, ErrorHandler>(
    state: State<State<Validator, ErrorHandler>>,
    req: Request,
    next: Next,
) -> impl Future<Output = Response>
where Validator: Validator<Data, Error: Send> + Send, ErrorHandler: ErrorHandler<Validator::Error> + Send,
Expand description

axum middleware-fn implementation.