Trait std::ops::AsyncFnMut

source ·
pub trait AsyncFnMut<Args>: AsyncFnOnce<Args>
where Args: Tuple,
{ type CallMutFuture<'a>: Future<Output = Self::Output> where Self: 'a; // Required method extern "rust-call" fn async_call_mut( &mut self, args: Args ) -> Self::CallMutFuture<'_>; }
🔬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 CallMutFuture<'a>: Future<Output = Self::Output> where Self: 'a

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

Future returned by AsyncFnMut::async_call_mut.

Required Methods§

source

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

🔬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, F> AsyncFnMut<A> for &F
where A: Tuple, F: AsyncFn<A> + ?Sized,

§

type CallMutFuture<'a> = <F as AsyncFn<A>>::CallFuture<'a> where &F: 'a

source§

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

§

type CallMutFuture<'a> = <F as AsyncFnMut<A>>::CallMutFuture<'a> where &mut F: 'a

source§

impl<Args, F, A> AsyncFnMut<Args> for Box<F, A>
where Args: Tuple, F: AsyncFnMut<Args> + ?Sized, A: Allocator,

§

type CallMutFuture<'a> = <F as AsyncFnMut<Args>>::CallMutFuture<'a> where Box<F, A>: 'a