1
0
mirror of https://github.com/fafhrd91/actix-web synced 2025-08-31 17:07:01 +02:00

rename FromRequest trait to Responder

This commit is contained in:
Nikolay Kim
2017-12-14 09:43:42 -08:00
parent 355f54efe2
commit c98d320f8c
9 changed files with 76 additions and 72 deletions

View File

@@ -2,7 +2,7 @@ use futures::Future;
use error::Error;
use pred::Predicate;
use handler::{Reply, Handler, FromRequest, RouteHandler, AsyncHandler, WrapHandler};
use handler::{Reply, Handler, Responder, RouteHandler, AsyncHandler, WrapHandler};
use httpcodes::HTTPNotFound;
use httprequest::HttpRequest;
use httpresponse::HttpResponse;
@@ -58,7 +58,7 @@ impl<S: 'static> Route<S> {
/// during route configuration, because it does not return reference to self.
pub fn f<F, R>(&mut self, handler: F)
where F: Fn(HttpRequest<S>) -> R + 'static,
R: FromRequest + 'static,
R: Responder + 'static,
{
self.handler = Box::new(WrapHandler::new(handler));
}