Trait core::ops::AsyncFnMut

source ·
pub trait AsyncFnMut<Args: Tuple>: AsyncFnOnce<Args> {
    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<'_>;
}
🔬This is a nightly-only experimental API. (async_fn_traits)
Expand description

An async-aware version of the FnMut trait.

All async fn and functions returning futures implement this trait.

Required Associated Types§

source

type CallRefFuture<'a>: Future<Output = Self::Output> where Self: 'a

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

Required Methods§

source

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

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

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

Object Safety§

This trait is not object safe.

Implementors§

source§

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

§

type CallRefFuture<'a> = <F as AsyncFnMut<A>>::CallRefFuture<'a> where Self: 'a

source§

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

§

type CallRefFuture<'a> = <F as AsyncFnMut<A>>::CallRefFuture<'a> where Self: 'a