pub struct Mutex<T: ?Sized> { /* private fields */ }Expand description
Asynchronous, single-threaded Mutex.
Thread Safety: This Mutex is built on Cell and UnsafeCell and does not use Rc. It automatically implements Send if T: Send, so it can be moved across threads. However, its guard (MutexGuard) is explicitly !Send.
Implementations§
Auto Trait Implementations§
impl<T> !Freeze for Mutex<T>
impl<T> !RefUnwindSafe for Mutex<T>
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: UnwindSafe + ?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