update handler docs

This commit is contained in:
ibraheemdev 2020-12-25 15:01:43 -05:00
parent e46d27ae1f
commit bacc5f5e3e
1 changed files with 4 additions and 2 deletions

View File

@ -14,8 +14,10 @@ use crate::request::HttpRequest;
use crate::responder::Responder; use crate::responder::Responder;
use crate::service::{ServiceRequest, ServiceResponse}; 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 /// 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. /// a valid handler. See [Request Handlers](https://actix.rs/docs/handlers/) for more information.
pub trait Handler<T, R, O>: Clone + 'static pub trait Handler<T, R, O>: Clone + 'static