Skip to main content

AsyncFn

Trait AsyncFn 

Source
pub trait AsyncFn<Args>: AsyncFnMut<Args> {
    // Required method
    fn call(&self, args: Args) -> Self::Future;
}

Required Methods§

Source

fn call(&self, args: Args) -> Self::Future

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<Func, Args> AsyncFn<Args> for Func
where Func: Fn<Args>, Func::Output: Future + Send,