handler_service

Function handler_service 

Source
pub fn handler_service<F, T>(func: F) -> HandlerService<F, T, BuilderMark>
where F: AsyncFn2<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.