Lines Matching defs:guard
34 /// let guard = v.try_access()?;
35 /// Some(guard.a + guard.b)
56 /// let guard = rcu::read_lock();
57 /// let e = v.try_access_with_guard(&guard)?;
96 /// Returns a guard that gives access to the object otherwise; the object is guaranteed to
97 /// remain accessible while the guard is alive. In such cases, callers are not allowed to sleep
100 let guard = rcu::read_lock();
104 Some(RevocableGuard::new(self.data.get(), guard))
115 /// remain accessible while the rcu read side guard is alive. In such cases, callers are not
128 /// Tries to access the wrapped object and run a closure on it while the guard is held.
131 /// guard is dropped afterwards. [`Self::try_access`] carries the risk that the caller will
132 /// forget to explicitly drop that returned guard before calling sleepable code; this method
199 /// [`Revocable::try_access`] beforehand and still haven't dropped the returned guard), this
227 /// A guard that allows access to a revocable object and keeps it alive.
234 /// The RCU read-side lock is held while the guard is alive.