Home
last modified time | relevance | path

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

/linux-6.15/rust/kernel/
H A Dtypes.rs203 pub struct ScopeGuard<T, F: FnOnce(T)>(Option<(T, F)>); struct
205 impl<T, F: FnOnce(T)> ScopeGuard<T, F> { impl
220 impl ScopeGuard<(), fn(())> { impl
222 pub fn new(cleanup: impl FnOnce()) -> ScopeGuard<(), impl FnOnce(())> { in new() argument
223 ScopeGuard::new_with_data((), move |()| cleanup()) in new()
227 impl<T, F: FnOnce(T)> Deref for ScopeGuard<T, F> { implementation
236 impl<T, F: FnOnce(T)> DerefMut for ScopeGuard<T, F> { implementation
243 impl<T, F: FnOnce(T)> Drop for ScopeGuard<T, F> { implementation
/linux-6.15/rust/kernel/sync/
H A Dlock.rs11 types::{NotThreadSafe, Opaque, ScopeGuard},
235 let _relock = ScopeGuard::new(|| in do_unlocked()