Rust reference

Tokio
cheat sheet.

Rust ownership, futures, tasks, channels, networking, testing, and graceful shutdown with Tokio.

26 topics43 code examplesUpdated
How Tokio fits together
01 / OWNOwn or borrow dataTasks need values that can live long enough.
02 / FUTURECreate a futureasync describes work that has not run yet.
03 / AWAITYield while waiting.await lets the runtime schedule other work.
04 / CLEANUPShut down cleanlyCancel and wait for owned tasks.
Jump to a specific topic

Choose a chapter

6 chapters · 26 topics