AsyncFnMut in std::ops - Rust (original) (raw)
Trait AsyncFnMut
1.85.0 · Source
pub trait AsyncFnMut<Args>: AsyncFnOnce<Args>
where
Args: Tuple,
{
type CallRefFuture<'a>: Future<Output = Self::Output>
where Self: 'a;
// Required method
extern "rust-call" fn async_call_mut(
&mut self,
args: Args,
) -> Self::CallRefFuture<'_>;
}
Expand description
An async-aware version of the FnMut trait.
All async fn
and functions returning futures implement this trait.
🔬This is a nightly-only experimental API. (async_fn_traits
)
🔬This is a nightly-only experimental API. (async_fn_traits
)
Call the AsyncFnMut, returning a future which may borrow from the called closure.
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.