Trait tracing_core::stdlib::ops::AsyncFn
source · pub trait AsyncFn<Args>: AsyncFnMut<Args>where
Args: Tuple,{
// Required method
extern "rust-call" fn async_call(
&self,
args: Args,
) -> Self::CallRefFuture<'_>;
}
🔬This is a nightly-only experimental API. (
async_closure
#62290)Expand description
An async-aware version of the Fn
trait.
All async fn
and functions returning futures implement this trait.
Required Methods§
sourceextern "rust-call" fn async_call(
&self,
args: Args,
) -> Self::CallRefFuture<'_>
🔬This is a nightly-only experimental API. (async_fn_traits
)
extern "rust-call" fn async_call( &self, args: Args, ) -> Self::CallRefFuture<'_>
async_fn_traits
)Call the AsyncFn
, returning a future which may borrow from the called closure.
Object Safety§
This trait is not object safe.