Movatterモバイル変換


[0]ホーム

URL:


AsyncFn

std::ops

TraitAsyncFn 

1.85.0 ·Source
pub trait AsyncFn<Args>:AsyncFnMut<Args>
where Args:Tuple,
{ // Required method extern "rust-call" fnasync_call( &self, args: Args, ) -> Self::CallRefFuture<'_>;}
Expand description

An async-aware version of theFn trait.

Allasync fn and functions returning futures implement this trait.

Required Methods§

Source

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

🔬This is a nightly-only experimental API. (async_fn_traits)

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

Dyn Compatibility§

This trait isnotdyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

1.85.0 ·Source§

impl<A, F>AsyncFn<A> for&F
where A:Tuple, F:AsyncFn<A> + ?Sized,

1.85.0 ·Source§

impl<Args, F, A>AsyncFn<Args> forBox<F, A>
where Args:Tuple, F:AsyncFn<Args> + ?Sized, A:Allocator,


[8]ページ先頭

©2009-2026 Movatter.jp