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::CallOnceFuture

Call the AsyncFnOnce, returning a future which may move out of the called closure.

Implementors