pub struct ThreadMutex<R: RawMutex, G: GetThreadId, T: ?Sized> { /* private fields */ }
Implementations§
Source§impl<R: RawMutex, G: GetThreadId, T> ThreadMutex<R, G, T>
impl<R: RawMutex, G: GetThreadId, T> ThreadMutex<R, G, T>
pub fn new(val: T) -> Self
pub fn into_inner(self) -> T
Source§impl<R: RawMutex, G: GetThreadId, T: ?Sized> ThreadMutex<R, G, T>
impl<R: RawMutex, G: GetThreadId, T: ?Sized> ThreadMutex<R, G, T>
pub fn lock(&self) -> Option<ThreadMutexGuard<'_, R, G, T>>
pub fn try_lock( &self, ) -> Result<ThreadMutexGuard<'_, R, G, T>, TryLockThreadError>
Trait Implementations§
Source§impl<R: RawMutex, G: GetThreadId, T: ?Sized + Debug> Debug for ThreadMutex<R, G, T>
impl<R: RawMutex, G: GetThreadId, T: ?Sized + Debug> Debug for ThreadMutex<R, G, T>
Source§impl<R: RawMutex, G: GetThreadId, T: Default> Default for ThreadMutex<R, G, T>
impl<R: RawMutex, G: GetThreadId, T: Default> Default for ThreadMutex<R, G, T>
impl<R: RawMutex + Send, G: GetThreadId + Send, T: ?Sized + Send> Send for ThreadMutex<R, G, T>
impl<R: RawMutex + Sync, G: GetThreadId + Sync, T: ?Sized + Send> Sync for ThreadMutex<R, G, T>
Auto Trait Implementations§
impl<R, G, T> !Freeze for ThreadMutex<R, G, T>
impl<R, G, T> !RefUnwindSafe for ThreadMutex<R, G, T>
impl<R, G, T> Unpin for ThreadMutex<R, G, T>
impl<R, G, T> UnwindSafe for ThreadMutex<R, G, 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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more