pub struct LockGuard<T>(_);
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> where
T: Send + Sync,
Auto Trait Implementations
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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more