pub struct StdSyncMutex<T>(/* private fields */);Expand description
Mutex wrapper backed by std::sync::Mutex.
Implementations§
Source§impl<T> StdSyncMutex<T>
impl<T> StdSyncMutex<T>
Sourcepub fn into_inner(self) -> T
pub fn into_inner(self) -> T
Consumes the mutex and returns the inner value.
Sourcepub fn lock(&self) -> StdSyncMutexGuard<'_, T>
pub fn lock(&self) -> StdSyncMutexGuard<'_, T>
Locks the mutex and returns the guard.
Trait Implementations§
Source§impl<T> SyncMutexLike<T> for StdSyncMutex<T>
impl<T> SyncMutexLike<T> for StdSyncMutex<T>
Source§type Guard<'a> = StdSyncMutexGuard<'a, T>
where
T: 'a
type Guard<'a> = StdSyncMutexGuard<'a, T> where T: 'a
Guard type returned by
SyncMutexLike::lock.Source§fn into_inner(self) -> T
fn into_inner(self) -> T
Consumes the mutex and returns the inner value.
Auto Trait Implementations§
impl<T> !Freeze for StdSyncMutex<T>
impl<T> RefUnwindSafe for StdSyncMutex<T>
impl<T> Send for StdSyncMutex<T>where
T: Send,
impl<T> Sync for StdSyncMutex<T>where
T: Send,
impl<T> Unpin for StdSyncMutex<T>where
T: Unpin,
impl<T> UnwindSafe for StdSyncMutex<T>
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