Searched defs:ScopeGuard (Results 1 – 1 of 1) sorted by relevance
/linux/rust/kernel/ |
H A D | types.rs | 208 pub struct ScopeGuard<T, F: FnOnce(T)>(Option<(T, F)>); struct 210 impl<T, F: FnOnce(T)> ScopeGuard<T, F> { implementation 225 impl ScopeGuard<(), fn(())> { impl 227 pub fn new(cleanup: impl FnOnce()) -> ScopeGuard<(), impl FnOnce(())> { in new() 232 impl<T, F: FnOnce(T)> Deref for ScopeGuard<T, F> { implementation 241 impl<T, F: FnOnce(T)> DerefMut for ScopeGuard<T, F> { implementation 248 impl<T, F: FnOnce(T)> Drop for ScopeGuard<T, F> { implementation
|