Skip to main content

GatewayMiddleware

Trait GatewayMiddleware 

Source
pub trait GatewayMiddleware:
    Send
    + Sync
    + 'static {
    // Required method
    fn call(
        &self,
        request: GatewayMiddlewareRequest,
        next: GatewayMiddlewareNext,
    ) -> GatewayMiddlewareFuture;
}
Expand description

Type-erased application policy registered by name on GatewayProxy or GatewayServer.

Required Methods§

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<F, Fut> GatewayMiddleware for F
where F: Fn(GatewayMiddlewareRequest, GatewayMiddlewareNext) -> Fut + Send + Sync + 'static, Fut: Future<Output = HttpResponse> + 'static,