pub fn serv<F, Req, Resp, E>(f: F) -> HyperServicewhere
F: Fn(Req) -> Box<dyn Future<Item = Resp, Error = E>> + 'static,
Req: for<'de> Deserialize<'de> + 'static,
Resp: Serialize + 'static,
E: From<Error> + Debug + Error + 'static,
Expand description
service
builds HyperService
with given function F
.