handler_with_doc

Function handler_with_doc 

Source
pub fn handler_with_doc<F, Fut, T>(
    f: F,
    summary: &str,
    description: &str,
) -> Arc<dyn Handler>
where F: Fn(Request) -> Fut + Send + Sync + 'static, Fut: Future<Output = Result<T>> + Send + 'static, T: Into<Response> + Send + 'static,
Expand description

便捷构造:将基于 Request 的处理函数包装为 Arc<dyn Handler> 并注册文档