funfun
heap_fn!
macro for allocating closures to the heap. Heap-allocated closures can be convenient when (re)assigning closures to structure fields, though heap allocation comes at the expense of inline optimization.
Usage:
let closure = heap_fn!;
closure.c; // "This closure lives in the heap now!"
let closure_identifier = ;
heap_fn!.c; // "Named closure!"