pub struct TryLock;
Expand description
Marker for trying to obtain a lock in a fallible way.
Trait Implementations§
Source§impl<'a, V> MutexMethod<'a, V> for TryLock
impl<'a, V> MutexMethod<'a, V> for TryLock
Source§impl ReadLockMethod for TryLock
impl ReadLockMethod for TryLock
Source§impl<'a, V> ReentrantMutexMethod<'a, V> for TryLock
impl<'a, V> ReentrantMutexMethod<'a, V> for TryLock
Source§fn lock(
&self,
mutex: &'a ReentrantMutex<V>,
) -> Option<ReentrantMutexGuard<'a, V>>
fn lock( &self, mutex: &'a ReentrantMutex<V>, ) -> Option<ReentrantMutexGuard<'a, V>>
Obtain a lock on a reentrant mutex. Blocking locks are infallible and always return a
‘Some()’ variant.
Source§impl WriteLockMethod for TryLock
impl WriteLockMethod for TryLock
Auto Trait Implementations§
impl Freeze for TryLock
impl RefUnwindSafe for TryLock
impl Send for TryLock
impl Sync for TryLock
impl Unpin for TryLock
impl UnwindSafe for TryLock
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