Trait AsyncFnOnce
#[must_use = "async closures are lazy and do nothing unless called"]
pub trait AsyncFnOnce<Args: Tuple>
An async-aware version of the FnOnce trait.
All async fn and functions returning futures implement this trait.
Associated Types
type CallOnceFuture: Future<Output = Self::Output>;Future returned by
AsyncFnOnce::async_call_once.type Output;Output type of the called closure's future.
Required Methods
extern ""rust-call"" fn async_call_once(self, args: Args) -> Self::CallOnceFutureCall the
AsyncFnOnce, returning a future which may move out of the called closure.
Implementors
impl<'a, A: Tuple, F> AsyncFnOnce<A> for &'a F where F: AsyncFn<A> + ?Sized,impl<'a, A: Tuple, F> AsyncFnOnce<A> for &'a mut F where F: AsyncFnMut<A> + ?Sized,impl<F, Args> AsyncFnOnce<Args> for SyncView<F> where F: AsyncFnOnce<Args>, Args: Tuple,