Skip to main content

NestedMutex

Trait NestedMutex 

Source
pub trait NestedMutex<'a, T>:
    Deref<Target = Mutex<T>>
    + Sized
    + 'a {
    // Provided methods
    fn nest_lock(self) -> LockResult<Nested<T, MutexGuard<'a, T>, Self>> { ... }
    fn nest_try_lock(self) -> TryLockResult<Nested<T, MutexGuard<'a, T>, Self>> { ... }
}

Provided Methods§

Source

fn nest_lock(self) -> LockResult<Nested<T, MutexGuard<'a, T>, Self>>

Source

fn nest_try_lock(self) -> TryLockResult<Nested<T, MutexGuard<'a, T>, Self>>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<'a, T, Outer: Deref<Target = Mutex<T>> + Sized + 'a> NestedMutex<'a, T> for Outer