pub fn defer<F>(f: F) -> impl Dropwhere F: FnOnce(),
Defer execution of a closure until the return value is dropped.