pub trait Middleware: Send + Sync {
// Required method
fn handle(
&self,
req: Request,
next: &(dyn Fn(Request) -> Response + Send + Sync),
) -> Response;
}Expand description
Middleware contract for request/response interception around dispatch.