Future

What’s a Future

A future is an object which represents a value, a value that becomes ready “some time later.”

Future as function result

Therefore, futures can be used to represent function results when those results can only become ready “some time later.” This usage of future separates results from functions.

Diagram 1: Represented by a future, the result bar is separated from its function foo.

This separation provides new ways to process ready-some-time-later results, making async Rust possible.

Diagram 2: Obtaining bar through a future.