Function scopeguard::guard_on_success
source · pub fn guard_on_success<T, F>(v: T, dropfn: F) -> ScopeGuard<T, F, OnSuccess>where
F: FnOnce(T),
Expand description
Create a new ScopeGuard
owning v
and with deferred closure dropfn
.
Requires crate feature use_std
.