Stdlibfuture
poll
import std::future::poll; · source
Poll<T>
type enum Poll<T> {
Ready(T);
Pending;
}
implement enum Poll<T> {
is_ready(&this) -> boolean;
is_pending(&this) -> boolean;
![sink]
into_ready(&this) -> T;
}
The result of one poll call. Pending means "not yet — I have arranged to be woken"; Ready(v) means the value is available and the future is done. into_ready unwraps a Poll you know is ready and panics otherwise, which is what a test driving a future by hand wants.