pub struct LockGuard<K>{ /* private fields */ }Expand description
Represents a hold on a specific lock.
The lock will be released and can be reacquired when the LockGuard is dropped.
§Example
let guard = store.lock("test").wait();
// the lock is released here
drop(guard);Trait Implementations§
Auto Trait Implementations§
impl<K> Freeze for LockGuard<K>where
K: Freeze,
impl<K> !RefUnwindSafe for LockGuard<K>
impl<K> Send for LockGuard<K>
impl<K> Sync for LockGuard<K>
impl<K> Unpin for LockGuard<K>where
K: Unpin,
impl<K> !UnwindSafe for LockGuard<K>
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