pub type Handler<T, H> = dyn Fn(T, H, &[u8]) -> Pin<Box<dyn Future<Output = Result<Vec<u8>, Error>> + Send + 'static>> + Send + Sync;Expand description
The type of a handler function.
Each handler receives shared state Arc<T> and a binary request slice &[u8],
and returns a Future that resolves to a binary response Vec<u8> or an Error.