handler

Function handler 

Source
pub fn handler<F, Fut>(f: F) -> HandlerFunc
where F: Fn(Request<Body>) -> Fut + Send + Sync + 'static, Fut: Future<Output = Response<Body>> + Send + 'static,
Expand description

Convert (req) -> async Response into HandlerFunc (one-time boxing).