pub struct Mutex<T> { /* private fields */ }
Expand description
Mock implementation of std::sync::Mutex
.
Implementations
sourceimpl<T> Mutex<T>
impl<T> Mutex<T>
sourcepub fn lock(&self) -> LockResult<MutexGuard<'_, T>>
pub fn lock(&self) -> LockResult<MutexGuard<'_, T>>
Acquires a mutex, blocking the current thread until it is able to do so.
Trait Implementations
Auto Trait Implementations
impl<T> !RefUnwindSafe for Mutex<T>
impl<T> !Send for Mutex<T>
impl<T> !Sync for Mutex<T>
impl<T> Unpin for Mutex<T>where
T: Unpin,
impl<T> UnwindSafe for Mutex<T>where
T: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more