Function defer

Source
pub fn defer<F: FnOnce()>(f: F) -> OnDrop<(), impl FnOnce(())>
Expand description

Returns a structure that calls f when dropped.