Trait AsyncFnOnce1

Source
pub trait AsyncFnOnce1<Arg0>: FnOnce(Arg0) -> Self::OutputFuture {
    type OutputFuture: Future<Output = <Self as AsyncFnOnce1<Arg0>>::Output>;
    type Output;
}
Expand description

A synonym for future-returning FnOnce-bounds with 1 arguments

The bound

F: AsyncFnOnce1<Arg0, Output = R>,

is equivalent to something like

F: FnOnce(Arg0) -> Fut,
Fut: Future<Output = R>,

Required Associated Types§

Source

type OutputFuture: Future<Output = <Self as AsyncFnOnce1<Arg0>>::Output>

Source

type Output

Implementors§

Source§

impl<F, Fut, Arg0> AsyncFnOnce1<Arg0> for F
where F: FnOnce(Arg0) -> Fut + ?Sized, Fut: Future,