pub struct Mutex<T, R>(/* private fields */);Expand description
A mutex assuming lock poisoning will never occur.
Implementations§
Source§impl<T, R: RawMutex> Mutex<T, R>
impl<T, R: RawMutex> Mutex<T, R>
Trait Implementations§
Source§impl<T: 'static, R: RawMutex + 'static> ExclusiveLock<T> for Mutex<T, R>
impl<T: 'static, R: RawMutex + 'static> ExclusiveLock<T> for Mutex<T, R>
Source§impl<T, I: Ip, R> GenericOverIp<I> for Mutex<T, R>where
T: GenericOverIp<I>,
impl<T, I: Ip, R> GenericOverIp<I> for Mutex<T, R>where
T: GenericOverIp<I>,
Auto Trait Implementations§
impl<T, R> !Freeze for Mutex<T, R>
impl<T, R> !RefUnwindSafe for Mutex<T, R>
impl<T, R> Send for Mutex<T, R>
impl<T, R> Sync for Mutex<T, R>
impl<T, R> Unpin for Mutex<T, R>
impl<T, R> UnsafeUnpin for Mutex<T, R>where
Mutex<R, T>: UnsafeUnpin,
impl<T, R> UnwindSafe for Mutex<T, R>where
Mutex<R, T>: UnwindSafe,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<B, A> LockBefore<B> for Awhere
B: LockAfter<A>,
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<L, T> UnlockedAccess<L> for Twhere
L: UnlockedAccessMarkerFor<T>,
impl<L, T> UnlockedAccess<L> for Twhere
L: UnlockedAccessMarkerFor<T>,
Source§type Data = <L as UnlockedAccessMarkerFor<T>>::Data
type Data = <L as UnlockedAccessMarkerFor<T>>::Data
The type of state being accessed.
Source§type Guard<'l> = &'l <L as UnlockedAccessMarkerFor<T>>::Data
where
T: 'l
type Guard<'l> = &'l <L as UnlockedAccessMarkerFor<T>>::Data where T: 'l
A guard providing read access to the data.
Source§fn access(&self) -> <T as UnlockedAccess<L>>::Guard<'_>
fn access(&self) -> <T as UnlockedAccess<L>>::Guard<'_>
How to access the state.