defer

Function defer 

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

Returns a structure that calls f when dropped.