Lines Matching full:guard
9 sync::lock::{Backend, Guard, Lock},
96 /// A guard for a [`GlobalLock`].
100 inner: Guard<'static, B::Item, B::Backend>,
163 // SAFETY: The lock is globally unique, so there can only be one guard.
171 // SAFETY: The lock is globally unique, so there can only be one guard.
202 /// let mut guard = MY_COUNTER.lock();
203 /// *guard += 1;
204 /// *guard
240 /// fn increment(&self, guard: &mut GlobalGuard<MY_MUTEX>) -> u32 {
241 /// let my_counter = self.my_counter.as_mut(guard);