pub struct Mutex<T: ?Sized, A: Allocator + Clone = Global> { /* private fields */ }Implementations§
Source§impl<T: ?Sized, A: Allocator + Clone> Mutex<T, A>
impl<T: ?Sized, A: Allocator + Clone> Mutex<T, A>
pub fn lock(&self) -> LockResult<MutexGuard<'_, T, A>>
pub fn try_lock(&self) -> TryLockResult<MutexGuard<'_, T, A>>
pub fn is_poisoned(&self) -> bool
pub fn clear_poison(&self)
pub fn into_inner(self) -> LockResult<T>where
T: Sized,
pub fn get_mut(&mut self) -> LockResult<&mut T>
Trait Implementations§
impl<T: ?Sized + Send, A: Allocator + Clone> Send for Mutex<T, A>
impl<T: ?Sized + Send, A: Allocator + Clone> Sync for Mutex<T, A>
Auto Trait Implementations§
impl<T, A = Global> !Freeze for Mutex<T, A>
impl<T, A = Global> !RefUnwindSafe for Mutex<T, A>
impl<T, A> Unpin for Mutex<T, A>
impl<T, A = Global> !UnwindSafe for Mutex<T, A>
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