pub trait Middleware: Send + Sync {
// Required method
fn process(
&self,
request: &mut Request,
next: &dyn RequestHandler,
) -> Result<Response, HttpError>;
}Expand description
Layer that may inspect or mutate the request, then call next.
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".