Searched refs:ScopeGuard (Results 1 – 3 of 3) sorted by relevance
| /rust/kernel/ |
| A D | types.rs | 220 pub struct ScopeGuard<T, F: FnOnce(T)>(Option<(T, F)>); struct 222 impl<T, F: FnOnce(T)> ScopeGuard<T, F> { implementation 237 impl ScopeGuard<(), fn(())> { implementation 239 pub fn new(cleanup: impl FnOnce()) -> ScopeGuard<(), impl FnOnce(())> { in new() argument 240 ScopeGuard::new_with_data((), move |()| cleanup()) in new() 244 impl<T, F: FnOnce(T)> Deref for ScopeGuard<T, F> { implementation 253 impl<T, F: FnOnce(T)> DerefMut for ScopeGuard<T, F> { implementation 260 impl<T, F: FnOnce(T)> Drop for ScopeGuard<T, F> { implementation
|
| A D | devres.rs | 17 types::{ARef, ForeignOwnable, Opaque, ScopeGuard}, 183 let inner = ScopeGuard::new_with_data(inner, |inner| inner.devm.complete_all()); in devres_callback()
|
| /rust/kernel/sync/ |
| A D | lock.rs | 11 types::{NotThreadSafe, Opaque, ScopeGuard}, 237 let _relock = ScopeGuard::new(|| in do_unlocked()
|
Completed in 5 milliseconds