> <@diondokter:matrix.org> This looks promising: https://docs.rs/stack_dst/latest/stack_dst/value/struct.Value.html * Ah yes, this works! Never saw this crate before. It was started 9 years ago! They give this example: ```rust use stack_dst::Value; // The closure is stored in two 64-bit integers (one for the vtable, the other for the value) fn make_closure(value: u64) -> ValueString, ::stack_dst::buffers::U64_2> { if value < 0x10000 { ValueA::new_stable(move || format!("Hello there! value={}", value), |v| v as _).ok().expect("Closure doesn't fit") } else { ValueA::new_stable(move || format!("Hello there! value={:#x}", value), |v| v as _).ok().expect("Closure doesn't fit") } } let closure = make_closure(12); assert_eq!( closure(), "Hello there! value=12" ); ```