pub type Middleware<T, H> = dyn Fn(T, H) -> Pin<Box<dyn Future<Output = Result<H, Error>> + Send + 'static>> + Send + Sync;