From bacc5f5e3e96b04aba22edb067425cef119f8814 Mon Sep 17 00:00:00 2001 From: ibraheemdev Date: Fri, 25 Dec 2020 15:01:43 -0500 Subject: [PATCH] update handler docs --- src/handler.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/handler.rs b/src/handler.rs index 9f8284dd9..4c86db114 100644 --- a/src/handler.rs +++ b/src/handler.rs @@ -14,8 +14,10 @@ use crate::request::HttpRequest; use crate::responder::Responder; use crate::service::{ServiceRequest, ServiceResponse}; -/// Async handler converter factory -/// +/// A request handler is an async function that accepts zero or more parameters that can be +/// extracted from a request (ie, [`impl FromRequest`](crate::FromRequest)) and returns a type that can be converted into +/// an [`HttpResponse`](crate::HttpResponse) (ie, [`impl Responder`](crate::Responder)). +/// /// If you got the error `the trait Handler<_, _, _> is not implemented`, then your function is not /// a valid handler. See [Request Handlers](https://actix.rs/docs/handlers/) for more information. pub trait Handler: Clone + 'static