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