pub struct Mutex<T: ?Sized>(/* private fields */);Expand description
Like std::sync::Mutex except that it does not poison itself.
Implementations§
Source§impl<T> Mutex<T>
impl<T> Mutex<T>
Sourcepub fn into_inner(self) -> T
pub fn into_inner(self) -> T
Like std::sync::Mutex::into_inner.
Source§impl<T: ?Sized> Mutex<T>
impl<T: ?Sized> Mutex<T>
Sourcepub fn lock<'a>(&'a self) -> MutexGuard<'a, T>
pub fn lock<'a>(&'a self) -> MutexGuard<'a, T>
Like std::sync::Mutex::lock.
Sourcepub fn try_lock<'a>(&'a self) -> TryLockResult<MutexGuard<'a, T>>
pub fn try_lock<'a>(&'a self) -> TryLockResult<MutexGuard<'a, T>>
Like std::sync::Mutex::try_lock.
Trait Implementations§
Auto Trait Implementations§
impl<T> !Freeze for Mutex<T>
impl<T> RefUnwindSafe for Mutex<T>where
T: ?Sized,
impl<T> Send for Mutex<T>
impl<T> Sync for Mutex<T>
impl<T> Unpin for Mutex<T>
impl<T> UnsafeUnpin for Mutex<T>where
T: UnsafeUnpin + ?Sized,
impl<T> UnwindSafe for Mutex<T>where
T: ?Sized,
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