Trait concurrency_traits::TryMutex [−][src]
pub trait TryMutex<'a> { type Item: ?Sized; type Guard: DerefMut<Target = Self::Item>; fn try_lock(&'a self) -> Option<Self::Guard>; }
A non-blocking mutex with try functions.
Implementation
It is recommended to implement TryMutexSized
if the implement-ee can be
sized.
Associated Types
type Item: ?Sized
[src]
The item stored in the mutex
type Guard: DerefMut<Target = Self::Item>
[src]
The guard for the mutex
Required methods
fn try_lock(&'a self) -> Option<Self::Guard>
[src]
Tries to lock the mutex, returning None
if not possible.
Implementations on Foreign Types
impl<'__a, T: ?Sized> TryMutex<'__a> for ManuallyDrop<T> where
T: TryMutex<'__a>,
[src]
impl<'__a, T: ?Sized> TryMutex<'__a> for ManuallyDrop<T> where
T: TryMutex<'__a>,
[src]impl<'__a, T> TryMutex<'__a> for AssertUnwindSafe<T> where
T: TryMutex<'__a>,
[src]
impl<'__a, T> TryMutex<'__a> for AssertUnwindSafe<T> where
T: TryMutex<'__a>,
[src]Implementors
impl<'a, T, M> TryMutex<'a> for CustomMutex<T, M> where
T: 'a,
M: RawTryMutex + 'a,
[src]
impl<'a, T, M> TryMutex<'a> for CustomMutex<T, M> where
T: 'a,
M: RawTryMutex + 'a,
[src]