Macro async_clone

Source
macro_rules! async_clone {
    ( [$( $x:ident )*] $y:expr ) => { ... };
}
Expand description

Creates an asynchronous block that clones a collection of variables before evaluating a given expression.

This macro accepts a list of identifiers enclosed in square brackets and an expression. It clones each specified variable and produces an async move block that evaluates the expression, thereby reducing boilerplate code when working with asynchronous closures that require cloned values.