Expand description
Allows mutual exclusion primitives that implement the Lock
trait to automatically unlock
when a guard goes out of scope. It also provides a safe and convenient way to access the data
protected by the lock.
Trait Implementations
impl<L, I> Sync for Guard<'_, L, I> where
L: Lock<I> + ?Sized,
L::Inner: Sync,
I: LockInfo,
Auto Trait Implementations
impl<'a, L: ?Sized, I> RefUnwindSafe for Guard<'a, L, I> where
L: RefUnwindSafe,
<L as Lock<I>>::GuardContext: RefUnwindSafe,
impl<'a, L: ?Sized, I> Send for Guard<'a, L, I> where
L: Sync,
<L as Lock<I>>::GuardContext: Send,
impl<'a, L: ?Sized, I> Unpin for Guard<'a, L, I> where
<L as Lock<I>>::GuardContext: Unpin,
impl<'a, L: ?Sized, I> UnwindSafe for Guard<'a, L, I> where
L: RefUnwindSafe,
<L as Lock<I>>::GuardContext: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more