Enter your book access code

The curriculum, drills, tutor, and interviewer mode are for readers of Ace the Rust Interview. The code is printed in the Preface (Companion site access).

Don’t have the book yet? Get it on Amazon (US and other storefronts linked in the site footer) — the Preface access code unlocks this gym.

advanced · order 151

Futures do nothing until polled

async-lazy-01Related book chapters: 13 (optional — this page is complete on its own)Futurelazy

Slug: async-lazy-01 · Paired reading: Chapter 13

Prompt

struct Tick<'a> { n: u32, side: &'a Cell<u32> } implementing Future. Construction must not touch side. First poll increments side and completes with Ready(()).