pub struct WaitCondVar<'mutex, 'cond_var, T, Guard>where
T: 'mutex + ?Sized,
Guard: AsyncMutexGuard<'mutex, T>,
Guard::Mutex: AsyncSubscribableMutex<T>,{ /* private fields */ }Expand description
WaitCondVar represents a future returned by the CondVar::wait method.
It is used to wait for a notification from a condition variable.
Implementations§
Source§impl<'mutex, 'cond_var, T, Guard> WaitCondVar<'mutex, 'cond_var, T, Guard>where
T: 'mutex + ?Sized,
Guard: AsyncMutexGuard<'mutex, T>,
Guard::Mutex: AsyncSubscribableMutex<T>,
impl<'mutex, 'cond_var, T, Guard> WaitCondVar<'mutex, 'cond_var, T, Guard>where
T: 'mutex + ?Sized,
Guard: AsyncMutexGuard<'mutex, T>,
Guard::Mutex: AsyncSubscribableMutex<T>,
Sourcepub fn new(cond_var: &'cond_var CondVar, mutex: &'mutex Guard::Mutex) -> Self
pub fn new(cond_var: &'cond_var CondVar, mutex: &'mutex Guard::Mutex) -> Self
Creates a new WaitCondVar.
Trait Implementations§
Source§impl<'mutex, T, Guard> Future for WaitCondVar<'mutex, '_, T, Guard>where
T: 'mutex + ?Sized,
Guard: AsyncMutexGuard<'mutex, T>,
Guard::Mutex: AsyncSubscribableMutex<T>,
impl<'mutex, T, Guard> Future for WaitCondVar<'mutex, '_, T, Guard>where
T: 'mutex + ?Sized,
Guard: AsyncMutexGuard<'mutex, T>,
Guard::Mutex: AsyncSubscribableMutex<T>,
Source§type Output = <<Guard as AsyncMutexGuard<'mutex, T>>::Mutex as AsyncMutex<T>>::Guard<'mutex>
type Output = <<Guard as AsyncMutexGuard<'mutex, T>>::Mutex as AsyncMutex<T>>::Guard<'mutex>
The type of value produced on completion.
impl<'mutex, T, Guard> Send for WaitCondVar<'mutex, '_, T, Guard>where
T: 'mutex + ?Sized + Send,
Guard: AsyncMutexGuard<'mutex, T> + Send,
Guard::Mutex: AsyncSubscribableMutex<T>,
Auto Trait Implementations§
impl<'mutex, 'cond_var, T, Guard> Freeze for WaitCondVar<'mutex, 'cond_var, T, Guard>where
T: ?Sized,
impl<'mutex, 'cond_var, T, Guard> RefUnwindSafe for WaitCondVar<'mutex, 'cond_var, T, Guard>
impl<'mutex, 'cond_var, T, Guard> Sync for WaitCondVar<'mutex, 'cond_var, T, Guard>
impl<'mutex, 'cond_var, T, Guard> Unpin for WaitCondVar<'mutex, 'cond_var, T, Guard>where
T: ?Sized,
impl<'mutex, 'cond_var, T, Guard> UnsafeUnpin for WaitCondVar<'mutex, 'cond_var, T, Guard>where
T: ?Sized,
impl<'mutex, 'cond_var, T, Guard> UnwindSafe for WaitCondVar<'mutex, 'cond_var, T, Guard>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<F> IntoFuture for Fwhere
F: Future,
impl<F> IntoFuture for Fwhere
F: Future,
Source§type IntoFuture = F
type IntoFuture = F
Which kind of future are we turning this into?
Source§fn into_future(self) -> <F as IntoFuture>::IntoFuture
fn into_future(self) -> <F as IntoFuture>::IntoFuture
Creates a future from a value. Read more