pub struct Condition<T>(/* private fields */);
Expand description
An async condition which combines a mutex and a condition variable.
Implementations§
Source§impl<T> Condition<T>
impl<T> Condition<T>
Sourcepub fn waker_count(&self) -> usize
pub fn waker_count(&self) -> usize
Returns the number of wakers waiting on the condition.
Sourcepub fn lock(&self) -> ConditionGuard<'_, T>
pub fn lock(&self) -> ConditionGuard<'_, T>
Same as Mutex::lock
.
Auto Trait Implementations§
impl<T> Freeze for Condition<T>
impl<T> RefUnwindSafe for Condition<T>
impl<T> Send for Condition<T>where
T: Send,
impl<T> Sync for Condition<T>where
T: Send,
impl<T> Unpin for Condition<T>
impl<T> UnwindSafe for Condition<T>
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