Trait AsyncFn

#[must_use = "async closures are lazy and do nothing unless called"]
pub trait AsyncFn<Args: Tuple>: AsyncFnMut<Args>

An async-aware version of the Fn trait.

All async fn and functions returning futures implement this trait.

Required Methods

extern ""rust-call"" fn async_call(&self, args: Args) -> Self::CallRefFuture<'_>

Call the AsyncFn, returning a future which may borrow from the called closure.

Implementors