Future::poll advances a future’s computation and reports whether it is still pending or ready. A runtime’s executor calls it; creating a future alone does not start its work. section 1.3 section 2.2.4
A future is polled as its work progresses:
- The executor calls poll to check whether the future is ready. section 2.2.4
- The result is Pending while work remains; Ready carries the future’s output, which may be an error. section 2.2.2
- For network work, the runtime can use Mio and the kernel; when the socket signals completion, a reactor wakes the executor to continue polling. section 2.2.5
An awaited HTTP request
In an async function, awaiting an HTTP request hands its future to the runtime. The executor polls it; after network work completes, the result becomes available to the awaiting code. section 1.3 section 2.2.5
Listing 2.23 Rust’s Future trait
// Docs: https://doc.rust-lang.org/std/future/trait.Future.html
// Source code:
// https:/ /doc.rust-lang.org/src/core/future/future.rs.html#36-104
pub trait Future {
type Output;
fn poll(self: Pin<&mut Self>, cx: &mut Context<'_>)
-> Poll<Self::Output>;
}
The Future trait signature shows poll’s inputs and its Poll<Self::Output> return type. section 2.2.4


