Home
last modified time | relevance | path

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

/linux/rust/kernel/
H 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(())> { impl
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
H A Ddevres.rs
/linux/rust/kernel/sync/
H A Dlock.rs11 types::{NotThreadSafe, Opaque, ScopeGuard},
245 let _relock = ScopeGuard::new(|| in do_unlocked()