pub fn handler_service<F, T, O>(func: F) -> HandlerService<F, T, O, BuilderMark>
where F: AsyncClosure<T> + Clone,
Expand description

A service factory shortcut offering given async function ability to use FromRequest to destruct and transform Service<Req>’s Req type and receive them as function argument.

Given async function’s return type must impl Responder trait for transforming arbitrary return type to Service::Future’s output type.