futures

Type Alias Poll

Source
pub type Poll<T, E> = Result<Async<T>, E>;
Expand description

A convenience wrapper for Result<Async<T>, E>.

Poll is the return type of the poll method on the Future trait.

  • Ok(Async::Ready(t)) means the future has successfully resolved.
  • Ok(Async::Pending) means the future is not able to fully resolve yet. The current task will be awoken when the future can make further progress.
  • Err(e) means that an error was encountered when attempting to complete the future. Futures which have returned errors are complete, and should not be polled again. However,Streams that have returned errors may not be complete and should still be polled.

Aliased Type§

enum Poll<T, E> {
    Ok(Async<T>),
    Err(E),
}

Variants§

§1.0.0

Ok(Async<T>)

Contains the success value

§1.0.0

Err(E)

Contains the error value