Struct parking_method::Recursive
source · [−]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
sourceimpl ReadLockMethod for Recursive<Blocking>
impl ReadLockMethod for Recursive<Blocking>
sourcefn read<'a, V>(&self, rwlock: &'a RwLock<V>) -> Option<RwLockReadGuard<'a, V>>
fn read<'a, V>(&self, rwlock: &'a RwLock<V>) -> Option<RwLockReadGuard<'a, V>>
Obtain a read lock. Blocking locks are infallible and always return a ‘Some()’ variant.
sourceimpl ReadLockMethod for Recursive<Duration>
impl ReadLockMethod for Recursive<Duration>
sourcefn read<'a, V>(&self, rwlock: &'a RwLock<V>) -> Option<RwLockReadGuard<'a, V>>
fn read<'a, V>(&self, rwlock: &'a RwLock<V>) -> Option<RwLockReadGuard<'a, V>>
Obtain a read lock. Blocking locks are infallible and always return a ‘Some()’ variant.
sourceimpl ReadLockMethod for Recursive<Instant>
impl ReadLockMethod for Recursive<Instant>
sourcefn read<'a, V>(&self, rwlock: &'a RwLock<V>) -> Option<RwLockReadGuard<'a, V>>
fn read<'a, V>(&self, rwlock: &'a RwLock<V>) -> Option<RwLockReadGuard<'a, V>>
Obtain a read lock. Blocking locks are infallible and always return a ‘Some()’ variant.
sourceimpl ReadLockMethod for Recursive<TryLock>
impl ReadLockMethod for Recursive<TryLock>
sourcefn read<'a, V>(&self, rwlock: &'a RwLock<V>) -> Option<RwLockReadGuard<'a, V>>
fn read<'a, V>(&self, rwlock: &'a RwLock<V>) -> Option<RwLockReadGuard<'a, V>>
Obtain a read lock. Blocking locks are infallible and always return a ‘Some()’ variant.
sourceimpl<'a, V> ReentrantMutexMethod<'a, V> for Recursive<Blocking>
impl<'a, V> ReentrantMutexMethod<'a, V> for Recursive<Blocking>
sourcefn 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. Read more
sourceimpl<'a, V> ReentrantMutexMethod<'a, V> for Recursive<Duration>
impl<'a, V> ReentrantMutexMethod<'a, V> for Recursive<Duration>
sourcefn 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. Read more
sourceimpl<'a, V> ReentrantMutexMethod<'a, V> for Recursive<Instant>
impl<'a, V> ReentrantMutexMethod<'a, V> for Recursive<Instant>
sourcefn 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. Read more
sourceimpl<'a, V> ReentrantMutexMethod<'a, V> for Recursive<TryLock>
impl<'a, V> ReentrantMutexMethod<'a, V> for Recursive<TryLock>
sourcefn 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. Read more
Auto Trait Implementations
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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more