Home
last modified time | relevance | path

Searched refs:ScopeGuard (Results 1 – 3 of 3) sorted by relevance

/rust/kernel/
A Dtypes.rs220 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 Ddevres.rs17 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 Dlock.rs11 types::{NotThreadSafe, Opaque, ScopeGuard},
237 let _relock = ScopeGuard::new(|| in do_unlocked()

Completed in 5 milliseconds