pub struct SharedGuard<T> { /* private fields */ }Expand description
Specialized guard for managing shared state
This guard is useful for managing Arc<Mutex
Implementations§
Sourcepub fn lock(
&mut self,
) -> Result<MutexGuard<'_, T>, PoisonError<MutexGuard<'_, T>>>
pub fn lock( &mut self, ) -> Result<MutexGuard<'_, T>, PoisonError<MutexGuard<'_, T>>>
Lock the mutex and get a reference to the data
This is a convenience method that handles the lock/unlock pattern
Trait Implementations§
Auto Trait Implementations§
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