October 2026
Intermediate to advanced
748 pages
18h 51m
English
In Chapter 20, we covered how to use Rust’s asynchronous programming system with async/await syntax and the Tokio runtime. Enabling asynchronous programming without either violating Rust’s rules of ownership and memory safety or compromising on performance isn’t trivial.
In this chapter, we’ll cover three foundational elements of asynchronous programming in Rust:
Future trait, which defines an interface between things that need to be waited for and things that wait,async fns make it easy to create futures, but implementing futures by hand makes their exact size and layout visible in your code, makes it easier to understand exactly what they do, and, of course, is necessary for new operations and types of I/O that don’t already have an ...
Read now
Unlock full access