Skip to main content

layer

Function layer 

Source
pub fn layer<F, Fut>(call: F) -> LayerFn<F>
where F: Fn(Request<Bytes>, Next) -> Fut + Send + Sync + 'static, Fut: Future<Output = Result<Response<ServiceBody>, HandlerError>> + Send + 'static,