nice-catch 0.1.0

Catch your data just before you drop it
Documentation

nice-catch

A Catch<T> is a Deref/DerefMut wrapper around a T and a F: FnOnce(T) which calls the function on T in place of drop.

This trick allows you to provide an owned static value with no indirection or locking to a caller that needs one, then recover the value externally after the caller returns.