pub fn defer<F>(f: F) -> impl Dropwhere F: FnOnce(),
RAII-style guard for executing a closure at the end of a scope.
This synchronous variant does not require async. Inspired by Go’s defer.
defer