Intermediate Rust
Q46 / 100

What is a Future in Rust?

Correct! Well done.

Incorrect.

The correct answer is B) A lazy computation represented as a state machine that produces a value when polled to completion

B

Correct Answer

A lazy computation represented as a state machine that produces a value when polled to completion

Explanation

Futures implement trait Future { type Output; fn poll(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Self::Output>; }. They do nothing until polled by an executor.

Progress
46/100