Mutex

Trait Mutex 

Source
pub trait Mutex<T>: Send + Sync {
    type Guard: for<'a> GuardLt<'a, T>;

    // Required method
    fn lock<'s, 'async_trait>(
        &'s self,
    ) -> Pin<Box<dyn Future<Output = Result<<Self::Guard as GuardLt<'s, T>>::Guard>> + Send + 'async_trait>>
       where Self: 'async_trait,
             's: 'async_trait;
}

Required Associated Types§

Source

type Guard: for<'a> GuardLt<'a, T>

Required Methods§

Source

fn lock<'s, 'async_trait>( &'s self, ) -> Pin<Box<dyn Future<Output = Result<<Self::Guard as GuardLt<'s, T>>::Guard>> + Send + 'async_trait>>
where Self: 'async_trait, 's: 'async_trait,

Implementors§

Source§

impl<T> Mutex<T> for LocalMutex<T>
where T: Send + Sync + 'static,

Source§

impl<T> Mutex<T> for RedisMutex
where T: Send + FromRedisValue + ToRedisArgs + Sync + 'static,