Trait AsyncFnOnce

Source
pub trait AsyncFnOnce<Args> {
    type Output;
    type Future: Future<Output = Self::Output> + Send;

    // Required method
    fn call_once(self, _: Args) -> Self::Future;
}

Required Associated Types§

Source

type Output

Source

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

Required Methods§

Source

fn call_once(self, _: Args) -> Self::Future

Implementors§

Source§

impl<Func, Args> AsyncFnOnce<Args> for Func
where Func: FnOnce<Args>, Func::Output: Future + Send,

Source§

type Output = <<Func as FnOnce<Args>>::Output as Future>::Output

Source§

type Future = <Func as FnOnce<Args>>::Output