future_fn

Macro future_fn 

Source
macro_rules! future_fn {
    ($($var:ident),*, { $($closure_body:tt)* }) => { ... };
    ($($var:ident),*, |$( $closure_param:ident $(: $closure_param_ty:ty)? ),*| { $($closure_body:tt)* }) => { ... };
}
Expand description

Generates an asynchronous closure that clones specified external variables and executes the given closure body asynchronously.

This macro supports two forms:

  1. An async closure with no parameters.
  2. An async closure with specified parameters.