mirror of https://github.com/fafhrd91/actix-web
update docs
This commit is contained in:
parent
0ee42c2346
commit
1db395c1dd
|
@ -59,13 +59,15 @@ use crate::{
|
||||||
/// This is the source code for the 2-parameter implementation of `Handler` to help illustrate the
|
/// This is the source code for the 2-parameter implementation of `Handler` to help illustrate the
|
||||||
/// bounds of the handler call after argument extraction:
|
/// bounds of the handler call after argument extraction:
|
||||||
/// ```ignore
|
/// ```ignore
|
||||||
/// impl<Func, Arg1, Arg2, R> Handler<(Arg1, Arg2), R> for Func
|
/// impl<Func, Arg1, Arg2, Fut> Handler<(Arg1, Arg2)> for Func
|
||||||
/// where
|
/// where
|
||||||
/// Func: Fn(Arg1, Arg2) -> R + Clone + 'static,
|
/// Func: Fn(Arg1, Arg2) -> Fut + Clone + 'static,
|
||||||
/// R: Future,
|
/// Fut: Future,
|
||||||
/// R::Output: Responder,
|
|
||||||
/// {
|
/// {
|
||||||
/// fn call(&self, (arg1, arg2): (Arg1, Arg2)) -> R {
|
/// type Output = Fut::Output;
|
||||||
|
/// type Future = Fut;
|
||||||
|
///
|
||||||
|
/// fn call(&self, (arg1, arg2): (Arg1, Arg2)) -> Self::Future {
|
||||||
/// (self)(arg1, arg2)
|
/// (self)(arg1, arg2)
|
||||||
/// }
|
/// }
|
||||||
/// }
|
/// }
|
||||||
|
@ -117,7 +119,8 @@ where
|
||||||
/// ```
|
/// ```
|
||||||
macro_rules! factory_tuple ({ $($param:ident)* } => {
|
macro_rules! factory_tuple ({ $($param:ident)* } => {
|
||||||
impl<Func, Fut, $($param,)*> Handler<($($param,)*)> for Func
|
impl<Func, Fut, $($param,)*> Handler<($($param,)*)> for Func
|
||||||
where Func: Fn($($param),*) -> Fut + Clone + 'static,
|
where
|
||||||
|
Func: Fn($($param),*) -> Fut + Clone + 'static,
|
||||||
Fut: Future,
|
Fut: Future,
|
||||||
{
|
{
|
||||||
type Output = Fut::Output;
|
type Output = Fut::Output;
|
||||||
|
|
Loading…
Reference in New Issue