pub struct Recursive<T>(pub T);
Expand description
Marker for recursive locking. Allows to obtain a read-lock multiple times by a single thread.
Tuple Fields§
§0: T
Trait Implementations§
Source§impl ReadLockMethod for Recursive<Blocking>
impl ReadLockMethod for Recursive<Blocking>
Source§impl ReadLockMethod for Recursive<Duration>
impl ReadLockMethod for Recursive<Duration>
Source§impl ReadLockMethod for Recursive<Instant>
impl ReadLockMethod for Recursive<Instant>
Source§impl ReadLockMethod for Recursive<TryLock>
impl ReadLockMethod for Recursive<TryLock>
Source§impl<'a, V> ReentrantMutexMethod<'a, V> for Recursive<Blocking>
impl<'a, V> ReentrantMutexMethod<'a, V> for Recursive<Blocking>
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<'a, V> ReentrantMutexMethod<'a, V> for Recursive<Duration>
impl<'a, V> ReentrantMutexMethod<'a, V> for Recursive<Duration>
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<'a, V> ReentrantMutexMethod<'a, V> for Recursive<Instant>
impl<'a, V> ReentrantMutexMethod<'a, V> for Recursive<Instant>
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<'a, V> ReentrantMutexMethod<'a, V> for Recursive<TryLock>
impl<'a, V> ReentrantMutexMethod<'a, V> for Recursive<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.
Auto Trait Implementations§
impl<T> Freeze for Recursive<T>where
T: Freeze,
impl<T> RefUnwindSafe for Recursive<T>where
T: RefUnwindSafe,
impl<T> Send for Recursive<T>where
T: Send,
impl<T> Sync for Recursive<T>where
T: Sync,
impl<T> Unpin for Recursive<T>where
T: Unpin,
impl<T> UnwindSafe for Recursive<T>where
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