FnLayerMethod

Trait FnLayerMethod 

Source
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

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so 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,