let on_heap = Box::new(...); let shared = Arc::new(...); let s = shared.clone(); function_that_accepts_lambda(move || { on_heap.bar(); s.foo(); });
Also, my sibling is correct that Copy types will just be copied, not moved.
Also, my sibling is correct that Copy types will just be copied, not moved.