[][src]Trait future_parking_lot::mutex::FutureLockable

pub trait FutureLockable<R: AsRef<Mutex<T>>, T, I: IntoFuture> {
    fn future_lock<F: FnOnce(MutexGuard<T>) -> I>(
        &self,
        func: F
    ) -> FutureLock<R, T, F, I>; }

Trait to permit FutureLock implementation on wrapped Mutex (not Mutex itself)

Required methods

fn future_lock<F: FnOnce(MutexGuard<T>) -> I>(
    &self,
    func: F
) -> FutureLock<R, T, F, I>

Takes a closure that will be executed when the Futures gains the read-lock

Loading content...

Implementors

impl<R: AsRef<Mutex<T>>, T, I: IntoFuture> FutureLockable<R, T, I> for R[src]

Loading content...