pub trait PollWait:
Unpin
+ Send
+ Sync
+ AsAny {
// Required methods
fn poll_wait(&mut self, cx: &mut Context<'_>) -> Poll<Result<()>>;
fn poll_cancel_wait(&mut self, cx: &mut Context<'_>) -> Poll<bool>;
}
Expand description
A trait for polling the state of waits.
Required Methods§
sourcefn poll_wait(&mut self, cx: &mut Context<'_>) -> Poll<Result<()>>
fn poll_wait(&mut self, cx: &mut Context<'_>) -> Poll<Result<()>>
Polls a wait for completion, consuming the object’s wait signal.
Depending on the wait object, this may fail. For platform events (e.g., eventfd on Linux, and NT events on Windows), this cannot fail.
sourcefn poll_cancel_wait(&mut self, cx: &mut Context<'_>) -> Poll<bool>
fn poll_cancel_wait(&mut self, cx: &mut Context<'_>) -> Poll<bool>
Cancels a polled wait.
Returns true if the wait signal was consumed.