pub trait FnLayerMethod: Send + 'static {
    // Required method
    fn call(
        &self,
        req: Request<SgBody>,
        inner: Inner
    ) -> impl Future<Output = Response<SgBody>> + Send;
}
Expand description

see FnLayer

Required Methods§

source

fn call( &self, req: Request<SgBody>, inner: Inner ) -> impl Future<Output = Response<SgBody>> + Send

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl<T> FnLayerMethod for Arc<T>
where T: FnLayerMethod + Sync,

source§

async fn call(&self, req: Request<SgBody>, inner: Inner) -> Response<SgBody>

Implementors§

source§

impl<F, Fut> FnLayerMethod for Closure<F, Fut>
where F: Fn(Request<SgBody>, Inner) -> Fut + Send + Sync + Clone + 'static, Fut: Future<Output = Response<SgBody>> + Send + 'static,

source§

impl<H, T, Fut> FnLayerMethod for Handler<H, T, Fut>
where T: 'static, H: HandlerFn<T, Fut> + Send + Clone + 'static, Fut: Future<Output = Response<SgBody>> + Send + 'static,