Skip to content
masterclass Buddy

Rust · Concept

async and await

Rust's async keyword creates a future from a function, closure, or block. The code runs when the future is awaited or polled, not when it is created.

Last updated

Syntax

async fn name(parameters) -> ReturnType { ... }
async { ... }
async || { ... }

In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.

Subscribe
  • await
  • Future
  • async blocks
  • async functions
  • async closures
  • asynchronous runtimes

Source: async - Rust. Checked 2026-11-03.