Trait AsyncFn

Source
pub trait AsyncFn<Args, Output> {
    // Required method
    fn call<'life0, 'async_trait>(
        &'life0 self,
        args: Args,
    ) -> Pin<Box<dyn Future<Output = Output> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}

Required Methods§

Source

fn call<'life0, 'async_trait>( &'life0 self, args: Args, ) -> Pin<Box<dyn Future<Output = Output> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Implementors§

Source§

impl<Func, Fut> AsyncFn<(), <Fut as Future>::Output> for Func
where Func: Send + Sync + Fn() -> Fut, Fut: Future + Send,

Source§

impl<Func, Fut, A: Send + 'static> AsyncFn<(A,), <Fut as Future>::Output> for Func
where Func: Send + Sync + Fn(A) -> Fut, Fut: Future + Send,

Source§

impl<Func, Fut, A: Send + 'static, B: Send + 'static> AsyncFn<(A, B), <Fut as Future>::Output> for Func
where Func: Send + Sync + Fn(A, B) -> Fut, Fut: Future + Send,

Source§

impl<Func, Fut, A: Send + 'static, B: Send + 'static, C: Send + 'static> AsyncFn<(A, B, C), <Fut as Future>::Output> for Func
where Func: Send + Sync + Fn(A, B, C) -> Fut, Fut: Future + Send,

Source§

impl<Func, Fut, A: Send + 'static, B: Send + 'static, C: Send + 'static, D: Send + 'static> AsyncFn<(A, B, C, D), <Fut as Future>::Output> for Func
where Func: Send + Sync + Fn(A, B, C, D) -> Fut, Fut: Future + Send,

Source§

impl<Func, Fut, A: Send + 'static, B: Send + 'static, C: Send + 'static, D: Send + 'static, E: Send + 'static> AsyncFn<(A, B, C, D, E), <Fut as Future>::Output> for Func
where Func: Send + Sync + Fn(A, B, C, D, E) -> Fut, Fut: Future + Send,

Source§

impl<Func, Fut, A: Send + 'static, B: Send + 'static, C: Send + 'static, D: Send + 'static, E: Send + 'static, F: Send + 'static> AsyncFn<(A, B, C, D, E, F), <Fut as Future>::Output> for Func
where Func: Send + Sync + Fn(A, B, C, D, E, F) -> Fut, Fut: Future + Send,

Source§

impl<Func, Fut, A: Send + 'static, B: Send + 'static, C: Send + 'static, D: Send + 'static, E: Send + 'static, F: Send + 'static, G: Send + 'static> AsyncFn<(A, B, C, D, E, F, G), <Fut as Future>::Output> for Func
where Func: Send + Sync + Fn(A, B, C, D, E, F, G) -> Fut, Fut: Future + Send,

Source§

impl<Func, Fut, A: Send + 'static, B: Send + 'static, C: Send + 'static, D: Send + 'static, E: Send + 'static, F: Send + 'static, G: Send + 'static, H: Send + 'static> AsyncFn<(A, B, C, D, E, F, G, H), <Fut as Future>::Output> for Func
where Func: Send + Sync + Fn(A, B, C, D, E, F, G, H) -> Fut, Fut: Future + Send,

Source§

impl<Func, Fut, A: Send + 'static, B: Send + 'static, C: Send + 'static, D: Send + 'static, E: Send + 'static, F: Send + 'static, G: Send + 'static, H: Send + 'static, I: Send + 'static> AsyncFn<(A, B, C, D, E, F, G, H, I), <Fut as Future>::Output> for Func
where Func: Send + Sync + Fn(A, B, C, D, E, F, G, H, I) -> Fut, Fut: Future + Send,

Source§

impl<Func, Fut, A: Send + 'static, B: Send + 'static, C: Send + 'static, D: Send + 'static, E: Send + 'static, F: Send + 'static, G: Send + 'static, H: Send + 'static, I: Send + 'static, J: Send + 'static> AsyncFn<(A, B, C, D, E, F, G, H, I, J), <Fut as Future>::Output> for Func
where Func: Send + Sync + Fn(A, B, C, D, E, F, G, H, I, J) -> Fut, Fut: Future + Send,

Source§

impl<Func, Fut, A: Send + 'static, B: Send + 'static, C: Send + 'static, D: Send + 'static, E: Send + 'static, F: Send + 'static, G: Send + 'static, H: Send + 'static, I: Send + 'static, J: Send + 'static, K: Send + 'static> AsyncFn<(A, B, C, D, E, F, G, H, I, J, K), <Fut as Future>::Output> for Func
where Func: Send + Sync + Fn(A, B, C, D, E, F, G, H, I, J, K) -> Fut, Fut: Future + Send,

Source§

impl<Func, Fut, A: Send + 'static, B: Send + 'static, C: Send + 'static, D: Send + 'static, E: Send + 'static, F: Send + 'static, G: Send + 'static, H: Send + 'static, I: Send + 'static, J: Send + 'static, K: Send + 'static, L: Send + 'static> AsyncFn<(A, B, C, D, E, F, G, H, I, J, K, L), <Fut as Future>::Output> for Func
where Func: Send + Sync + Fn(A, B, C, D, E, F, G, H, I, J, K, L) -> Fut, Fut: Future + Send,