pub struct WaiterQueue<T> { /* private fields */ }Implementations§
Source§impl<T: IFulfillment> WaiterQueue<T>
impl<T: IFulfillment> WaiterQueue<T>
pub fn new() -> Self
pub fn lock(&self) -> WaiterQueueGuard<'_, T>
pub fn notify_one_local(&self, fulfillment: T) -> Option<T>
Source§impl WaiterQueue<()>
impl WaiterQueue<()>
Sourcepub fn notify_one(&self) -> bool
pub fn notify_one(&self) -> bool
Returns true if a waiter was notified.
pub fn notify_all(&self) -> usize
Sourcepub unsafe fn wait(&self) -> Waiter<'_, ()>
pub unsafe fn wait(&self) -> Waiter<'_, ()>
§Safety
You must cancel the returned waiter before it is dropped.
pub async fn wait_for<R>(&self, condition: impl FnMut() -> Option<R>) -> R
pub async fn wait_until(&self, condition: impl Fn() -> bool)
Trait Implementations§
impl<T> Send for WaiterQueue<T>
impl<T> Sync for WaiterQueue<T>
Auto Trait Implementations§
impl<T> !Freeze for WaiterQueue<T>
impl<T> !RefUnwindSafe for WaiterQueue<T>
impl<T> Unpin for WaiterQueue<T>
impl<T> !UnwindSafe for WaiterQueue<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