Trait LockMut

Source
pub trait LockMut:
    Send
    + Sync
    + 'static {
    type Inner;
    type Output<'a>: DerefMut<Target = Self::Inner> + Send;

    // Required method
    fn lock_mut<'a>(&'a self) -> impl Future<Output = Self::Output<'a>> + Send;
}
Expand description

Locking primitives, Mutable Access

Required Associated Types§

Source

type Inner

Source

type Output<'a>: DerefMut<Target = Self::Inner> + Send

Required Methods§

Source

fn lock_mut<'a>(&'a self) -> impl Future<Output = Self::Output<'a>> + Send

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl<T: Send + Sync + 'static> LockMut for Mutex<T>

Source§

type Inner = T

Source§

type Output<'a> = MutexGuard<'a, T>

Source§

fn lock_mut<'a>(&'a self) -> impl Future<Output = Self::Output<'a>> + Send

Source§

impl<T: Send + Sync + 'static> LockMut for RwLock<T>

Source§

type Inner = T

Source§

type Output<'a> = RwLockWriteGuard<'a, T>

Source§

fn lock_mut<'a>(&'a self) -> impl Future<Output = Self::Output<'a>> + Send

Implementors§