1
0
mirror of https://github.com/fafhrd91/actix-web synced 2025-08-22 05:35:08 +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

@@ -5,7 +5,7 @@ use http::{Method, StatusCode};
use pred;
use body::Body;
use route::Route;
use handler::{Reply, Handler, FromRequest};
use handler::{Reply, Handler, Responder};
use httprequest::HttpRequest;
use httpresponse::HttpResponse;
@@ -120,7 +120,7 @@ impl<S: 'static> Resource<S> {
/// ```
pub fn f<F, R>(&mut self, handler: F)
where F: Fn(HttpRequest<S>) -> R + 'static,
R: FromRequest + 'static,
R: Responder + 'static,
{
self.routes.push(Route::default());
self.routes.last_mut().unwrap().f(handler)