scopeguard

Macro defer_on_unwind

Source
macro_rules! defer_on_unwind {
    ($($t:tt)*) => { ... };
}
Expand description

Macro to create a ScopeGuard (run on unwinding from panic).

The macro takes statements, which are the body of a closure that will run when the scope is exited.

Requires crate feature use_std.