pub struct WakerSet { /* private fields */ }Expand description
A set holding wakers.
Implementations§
Source§impl WakerSet
impl WakerSet
Sourcepub fn insert(&self, cx: &Context<'_>) -> usize
pub fn insert(&self, cx: &Context<'_>) -> usize
Inserts a waker for a blocked operation and returns a key associated with it.
Sourcepub fn cancel(&self, key: usize) -> bool
pub fn cancel(&self, key: usize) -> bool
Removes the waker of a cancelled operation.
Returns true if another blocked operation from the set was notified.
Sourcepub fn notify_all(&self) -> bool
pub fn notify_all(&self) -> bool
Notifies all blocked operations.
Returns true if at least one operation was notified.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for WakerSet
impl !RefUnwindSafe for WakerSet
impl Unpin for WakerSet
impl UnwindSafe for WakerSet
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