pub trait Middleware: Send + Sync {
// Required methods
fn call<'async_trait>(
self: Box<Self>,
request: Request<Body>,
next: Next,
) -> Pin<Box<dyn Future<Output = Response<Body>> + Send + 'async_trait>>
where Self: 'async_trait;
fn clone_box(&self) -> Box<dyn Middleware>;
}Required Methods§
fn call<'async_trait>(
self: Box<Self>,
request: Request<Body>,
next: Next,
) -> Pin<Box<dyn Future<Output = Response<Body>> + Send + 'async_trait>>where
Self: 'async_trait,
fn clone_box(&self) -> Box<dyn Middleware>
Trait Implementations§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".