Function guard
#[must_use]
pub fn guard<T, F>(v: T, dropfn: F) -> ScopeGuard<T, F, Always>
where
F: FnOnce(T),
Create a new ScopeGuard owning v and with deferred closure dropfn.
guard#[must_use]
pub fn guard<T, F>(v: T, dropfn: F) -> ScopeGuard<T, F, Always>
where
F: FnOnce(T),
Create a new ScopeGuard owning v and with deferred closure dropfn.