Lines Matching refs:ScopeGuard
298 pub struct ScopeGuard<T, F, S = Always> struct
308 impl<T, F, S> ScopeGuard<T, F, S> implementation
317 pub fn with_strategy(v: T, dropfn: F) -> ScopeGuard<T, F, S> { in with_strategy()
318 ScopeGuard { in with_strategy()
367 pub fn guard<T, F>(v: T, dropfn: F) -> ScopeGuard<T, F, Always> in guard()
370 ScopeGuard::with_strategy(v, dropfn) in guard()
378 pub fn guard_on_success<T, F>(v: T, dropfn: F) -> ScopeGuard<T, F, OnSuccess> in guard_on_success()
381 ScopeGuard::with_strategy(v, dropfn) in guard_on_success()
413 pub fn guard_on_unwind<T, F>(v: T, dropfn: F) -> ScopeGuard<T, F, OnUnwind> in guard_on_unwind()
416 ScopeGuard::with_strategy(v, dropfn) in guard_on_unwind()
422 unsafe impl<T, F, S> Sync for ScopeGuard<T, F, S> implementation
428 impl<T, F, S> Deref for ScopeGuard<T, F, S> implementation
439 impl<T, F, S> DerefMut for ScopeGuard<T, F, S> implementation
448 impl<T, F, S> Drop for ScopeGuard<T, F, S> implementation
464 impl<T, F, S> fmt::Debug for ScopeGuard<T, F, S> implementation
470 f.debug_struct(stringify!(ScopeGuard)) in fmt()
576 let inner = ScopeGuard::into_inner(guard); in test_into_inner()