Struct no_deadlocks::Mutex
source · pub struct Mutex<T: ?Sized> { /* private fields */ }
Expand description
An instrumented version of std::sync::Mutex
Implementations§
source§impl<T> Mutex<T>
impl<T> Mutex<T>
pub fn new(inner: T) -> Self
pub fn with_manager(manager: Arc<LockManager>, inner: T) -> Self
pub fn into_inner(self) -> LockResult<T>
source§impl<T: ?Sized> Mutex<T>
impl<T: ?Sized> Mutex<T>
pub fn get_mut(&mut self) -> LockResult<&mut T>
pub fn is_poisoned(&self) -> bool
pub fn try_lock(&self) -> TryLockResult<MutexGuard<'_, T>>
pub fn lock(&self) -> LockResult<MutexGuard<'_, T>>
Trait Implementations§
impl<T: Send> Send for Mutex<T>
impl<T: Send> Sync for Mutex<T>
Auto Trait Implementations§
impl<T> !RefUnwindSafe for Mutex<T>
impl<T: ?Sized> Unpin for Mutex<T>where T: Unpin,
impl<T> !UnwindSafe for Mutex<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