pub struct Mutex<T: ?Sized>(_);
Expand description
Like std::sync::Mutex
except that it does not poison itself.
Implementations
sourceimpl<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
.
sourceimpl<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: ?Sized> RefUnwindSafe for Mutex<T>
impl<T: ?Sized> Send for Mutex<T> where
T: Send,
impl<T: ?Sized> Sync for Mutex<T> where
T: Send,
impl<T: ?Sized> Unpin for Mutex<T> where
T: Unpin,
impl<T: ?Sized> UnwindSafe for Mutex<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