Function handler
Source pub fn handler<H, Args>(h: H) -> BoxedHandler
Expand description
Create an optimized handler from a function.
§Example
ⓘuse armature_core::handler::handler;
async fn my_handler(req: HttpRequest) -> Result<HttpResponse, Error> {
Ok(HttpResponse::ok())
}
let h = handler(my_handler);