pub trait AsyncFnOnce<Args>where Args:Tuple,{ typeCallOnceFuture:Future<Output = Self::Output>; typeOutput; // Required method extern "rust-call" fnasync_call_once( self, args: Args, ) -> Self::CallOnceFuture;}Expand description
An async-aware version of theFnOnce trait.
Allasync fn and functions returning futures implement this trait.
Required Associated Types§
SourcetypeCallOnceFuture:Future<Output = Self::Output>
🔬This is a nightly-only experimental API. (async_fn_traits)
typeCallOnceFuture:Future<Output = Self::Output>
async_fn_traits)Future returned byAsyncFnOnce::async_call_once.
Required Methods§
Sourceextern "rust-call" fnasync_call_once( self, args: Args,) -> Self::CallOnceFuture
🔬This is a nightly-only experimental API. (async_fn_traits)
extern "rust-call" fnasync_call_once( self, args: Args,) -> Self::CallOnceFuture
async_fn_traits)Call theAsyncFnOnce, returning a future which may move out of the called closure.