mirror of
https://github.com/fafhrd91/actix-web
synced 2025-08-31 17:07:01 +02:00
allow to use fn with multiple arguments with .with()/.with_async()
This commit is contained in:
@@ -17,6 +17,7 @@ use pred::Predicate;
|
||||
use resource::{DefaultResource, Resource};
|
||||
use router::{ResourceDef, Router};
|
||||
use server::Request;
|
||||
use with::WithFactory;
|
||||
|
||||
/// Resources scope
|
||||
///
|
||||
@@ -222,7 +223,7 @@ impl<S: 'static> Scope<S> {
|
||||
/// ```
|
||||
pub fn route<T, F, R>(mut self, path: &str, method: Method, f: F) -> Scope<S>
|
||||
where
|
||||
F: Fn(T) -> R + 'static,
|
||||
F: WithFactory<T, S, R>,
|
||||
R: Responder + 'static,
|
||||
T: FromRequest<S> + 'static,
|
||||
{
|
||||
|
Reference in New Issue
Block a user