MutexGuard

Type Alias MutexGuard 

Source
pub type MutexGuard<'a, T> = MutexGuard<'a, T>;

Aliased Type§

pub struct MutexGuard<'a, T> { /* private fields */ }

Trait Implementations§

Source§

impl<'a, T> AsyncUnlockable for MutexGuard<'a, T>

Source§

fn unlocked_async<'life0, 'async_trait, F, U>( s: &'life0 mut Self, f: F, ) -> Pin<Box<dyn Future<Output = U> + 'async_trait>>
where F: AsyncFnOnce() -> U + 'async_trait, U: 'async_trait, Self: 'async_trait, 'life0: 'async_trait,

Temporarily unlocks the guard s, executes the async function f, and then re-locks the guard. The lock is guaranteed to be re-acquired before this function returns.