pub trait Layer:
Send
+ Sync
+ 'static {
// Required method
fn call(
&self,
request: Request<Bytes>,
next: Next,
) -> Pin<Box<dyn Future<Output = Result<Response<ServiceBody>, HandlerError>> + Send + '_>>;
}Required Methods§
fn call( &self, request: Request<Bytes>, next: Next, ) -> Pin<Box<dyn Future<Output = Result<Response<ServiceBody>, HandlerError>> + Send + '_>>
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".