Home
last modified time | relevance | path

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

/linux/rust/kernel/
A Dtypes.rs208 pub struct ScopeGuard<T, F: FnOnce(T)>(Option<(T, F)>); struct
210 impl<T, F: FnOnce(T)> ScopeGuard<T, F> { impls
225 impl ScopeGuard<(), fn(())> { impls
227 pub fn new(cleanup: impl FnOnce()) -> ScopeGuard<(), impl FnOnce(())> { in new() argument
228 ScopeGuard::new_with_data((), move |_| cleanup()) in new()
232 impl<T, F: FnOnce(T)> Deref for ScopeGuard<T, F> { implementation
241 impl<T, F: FnOnce(T)> DerefMut for ScopeGuard<T, F> { implementation
248 impl<T, F: FnOnce(T)> Drop for ScopeGuard<T, F> { implementation
A Dinit.rs218 types::{Opaque, ScopeGuard},
1094 let mut init_count = ScopeGuard::new_with_data(0, |i| {
1138 let mut init_count = ScopeGuard::new_with_data(0, |i| {
/linux/rust/kernel/sync/
A Dlock.rs9 use crate::{init::PinInit, pin_init, str::CStr, types::Opaque, types::ScopeGuard};
155 ScopeGuard::new(|| unsafe { B::relock(self.lock.state.get(), &mut self.state) }); in do_unlocked()

Completed in 11 milliseconds