Module lib::assert_poll
source · Expand description
Assert macros for Poll {Ready, Pending}
These macros help compare a Poll that is either Ready, Pending.
The macros use these capabilities:
-
implements
.is_ready() -> boolean -
implements
.is_pending() -> boolean
§Macros
-
assert_poll_ready!(a)≈ a.is_ready() -
assert_poll_pending!(a)≈ a.is_pending()
§Example
use std::task::Poll;
let a: Poll<i8> = Poll::Ready(1);
assert_poll_ready!(a);Modules§
- Assert poll.is_pending() is true.
- Assert poll.is_ready() is true.