pub struct Guard<'a, T: ?Sized, B: Backend> { /* private fields */ }
Expand description
A lock guard.
Allows mutual exclusion primitives that implement the Backend
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<T: Sync + ?Sized, B: Backend> Sync for Guard<'_, T, B>
Auto Trait Implementations§
impl<'a, T, B> !RefUnwindSafe for Guard<'a, T, B>
impl<'a, T, B> !Send for Guard<'a, T, B>
impl<'a, T: ?Sized, B> Unpin for Guard<'a, T, B>where <B as Backend>::GuardState: Unpin,
impl<'a, T, B> !UnwindSafe for Guard<'a, T, B>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more