Trait AsyncMutex

Source
pub trait AsyncMutex {
    type Data;

    // Required method
    fn lock(&self) -> impl Future<Output: DerefMut<Target = Self::Data>>;
}

Required Associated Types§

Required Methods§

Source

fn lock(&self) -> impl Future<Output: DerefMut<Target = Self::Data>>

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<'a, T: AsyncMutex> AsyncMutex for &'a T

Source§

type Data = <T as AsyncMutex>::Data

Source§

fn lock(&self) -> impl Future<Output: DerefMut<Target = Self::Data>>

Source§

impl<T: AsyncMutex, F: FnOnce() -> T> AsyncMutex for LazyCell<T, F>

Source§

type Data = <T as AsyncMutex>::Data

Source§

fn lock(&self) -> impl Future<Output: DerefMut<Target = Self::Data>>

Implementors§