Home
last modified time | relevance | path

Searched refs:ScopeGuard (Results 1 – 4 of 4) 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> { impl
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
/linux/rust/kernel/block/mq/
H A Dgen_disk.rs17 types::{ForeignOwnable, ScopeGuard},
105 let recover_data = ScopeGuard::new(|| { in build()
/linux/rust/kernel/sync/
H A Dlock.rs11 types::{NotThreadSafe, Opaque, ScopeGuard},
245 let _relock = ScopeGuard::new(|| in do_unlocked()
/linux/drivers/android/binder/
H A Dtransaction.rs13 types::ScopeGuard,
364 let send_failed_reply = ScopeGuard::new(|| { in do_work()