AsyncFn2

Trait AsyncFn2 

Source
pub trait AsyncFn2<Arg> {
    type Output;
    type Future: Future<Output = Self::Output>;

    // Required method
    fn call(&self, arg: Arg) -> Self::Future;
}
Expand description

helper trait flatting tuple of arguments.

FromRequest trait extract a tuple of (type1, type2, type3, ..) from request type. this trait would destruct the tuple handling over it to an async function use them as arguments.

Required Associated Types§

Source

type Output

Source

type Future: Future<Output = Self::Output>

Required Methods§

Source

fn call(&self, arg: Arg) -> Self::Future

Implementors§

Source§

impl<Func, Fut> AsyncFn2<()> for Func
where Func: Fn() -> Fut, Fut: Future,

Source§

type Output = <Fut as Future>::Output

Source§

type Future = Fut

Source§

impl<Func, Fut, A> AsyncFn2<(A,)> for Func
where Func: Fn(A) -> Fut, Fut: Future,

Source§

type Output = <Fut as Future>::Output

Source§

type Future = Fut

Source§

impl<Func, Fut, A, B> AsyncFn2<(A, B)> for Func
where Func: Fn(A, B) -> Fut, Fut: Future,

Source§

type Output = <Fut as Future>::Output

Source§

type Future = Fut

Source§

impl<Func, Fut, A, B, C> AsyncFn2<(A, B, C)> for Func
where Func: Fn(A, B, C) -> Fut, Fut: Future,

Source§

type Output = <Fut as Future>::Output

Source§

type Future = Fut

Source§

impl<Func, Fut, A, B, C, D> AsyncFn2<(A, B, C, D)> for Func
where Func: Fn(A, B, C, D) -> Fut, Fut: Future,

Source§

type Output = <Fut as Future>::Output

Source§

type Future = Fut

Source§

impl<Func, Fut, A, B, C, D, E> AsyncFn2<(A, B, C, D, E)> for Func
where Func: Fn(A, B, C, D, E) -> Fut, Fut: Future,

Source§

type Output = <Fut as Future>::Output

Source§

type Future = Fut

Source§

impl<Func, Fut, A, B, C, D, E, F> AsyncFn2<(A, B, C, D, E, F)> for Func
where Func: Fn(A, B, C, D, E, F) -> Fut, Fut: Future,

Source§

type Output = <Fut as Future>::Output

Source§

type Future = Fut

Source§

impl<Func, Fut, A, B, C, D, E, F, G> AsyncFn2<(A, B, C, D, E, F, G)> for Func
where Func: Fn(A, B, C, D, E, F, G) -> Fut, Fut: Future,

Source§

type Output = <Fut as Future>::Output

Source§

type Future = Fut

Source§

impl<Func, Fut, A, B, C, D, E, F, G, H> AsyncFn2<(A, B, C, D, E, F, G, H)> for Func
where Func: Fn(A, B, C, D, E, F, G, H) -> Fut, Fut: Future,

Source§

type Output = <Fut as Future>::Output

Source§

type Future = Fut

Source§

impl<Func, Fut, A, B, C, D, E, F, G, H, I> AsyncFn2<(A, B, C, D, E, F, G, H, I)> for Func
where Func: Fn(A, B, C, D, E, F, G, H, I) -> Fut, Fut: Future,

Source§

type Output = <Fut as Future>::Output

Source§

type Future = Fut