defer

Function defer 

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

Returns a structure that calls f when dropped.