[][src]Type Definition component_future::Poll

type Poll<Item, Error> = Result<Async<Item>, Error>;

Each component poll method should return a value of this type.

  • Ok(Async::Ready(t)) means that the overall future or stream is ready to return a value.
  • Ok(Async::NotReady) means that a poll method called by one of the component futures or streams returned NotReady, and so it's safe for the overall future or stream to also return NotReady.
  • Ok(Async::DidWork) means that the overall future made progress by updating its internal state, but isn't yet ready to return a value.
  • Ok(Async::NothingToDo) means that no work was done at all.
  • Err(e) means that the overall future or stream is ready to return an error.