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? The landing page stays open — purchase unlocks this gym.

advanced · order 178

async fn in traits Send bound

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

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

Prompt

RPITIT style (avoid async_fn_in_trait lint): trait KeyValue { fn get(&self, key: &str) -> impl Future<Output = Option<String>> + Send; } with MemStore impl. Test with block_on; assert the future is Send.