pub trait Next: Send + Sync {
// Required method
fn call(self, request: Request) -> impl Future<Output = Response> + Send;
}Expand description
The continuation passed to a MiddlewareService: runs the rest of the
chain (the next middleware, or the route handler).
Call call to forward the (possibly modified) request inward
and obtain the response. Not calling it short-circuits the chain: your
response is returned without running any inner middleware or the handler.
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".