pub struct LockGuard<T>(/* private fields */);Expand description
A handle to a held Lock.
As long as you have this guard, you have exclusive access to the underlying T. The guard
internally keeps a reference-couned pointer to the original Lock, so even if the lock goes
away, the guard remains valid.
The lock is automatically released whenever the guard is dropped, at which point poll_lock
will succeed yet again.
Trait Implementations§
impl<T> Sync for LockGuard<T>
Auto Trait Implementations§
impl<T> Freeze for LockGuard<T>
impl<T> !RefUnwindSafe for LockGuard<T>
impl<T> Send for LockGuard<T>where
T: Send,
impl<T> Unpin for LockGuard<T>
impl<T> !UnwindSafe for LockGuard<T>
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