Skip to main content

## MutexSafe

# Trait MutexSafe

Source

    pub trait MutexSafe<T: ?Sized> {
        // Required method
        fn lock_safe(&self) -> MutexGuard<'_, T>;
    }

Expand description

Poison-tolerant locking for `std::sync::Mutex`.

## Required Methods§

Source

#### fn lock_safe(&self) -> MutexGuard<'_, T>

Lock the mutex, recovering the inner guard if the lock was poisoned.

## Implementations on Foreign Types§

Source §

### impl<T: ?Sized> MutexSafe<T> for Mutex<T>

Source §

#### fn lock_safe(&self) -> MutexGuard<'_, T>

## Implementors§