Function xitca_web::handler::handler_service

source ·
pub fn handler_service<F, T>(func: F) -> HandlerService<F, T, 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.