More Powerful Closure Captures
This crate provides simple macros letting you express more powerful closure captures. For example, you can capture the clone of a value:
use Rc;
let my_val = new;
capture!;
You can also capture arbitrary expressions and override the Edition-2021 capture semantics. Best of all, you can even specify that your closure should not capture any variables outside the ones you've listed:
let a = 1;
let b = 2;
capture_only!
Consult the full documentation for the details.