Type Alias MiddlewareFn

Source
pub type MiddlewareFn = Arc<dyn Fn(Request, Box<dyn Fn(Request) -> Pin<Box<dyn Future<Output = Response> + Send + 'static>> + Send + Sync>) -> Pin<Box<dyn Future<Output = Response> + Send + 'static>> + Send + Sync + 'static>;
Expand description

Function signature for middleware - takes a request and the next handler

Aliased Typeยง

pub struct MiddlewareFn { /* private fields */ }