Skip to main content
Brave Programmer Logo

BraveProgrammer

BraveProgrammer

HomeProjectsBlogsCoursesLessonsAbout

Site footer

BraveProgrammer

Free coding courses, practical tutorials, and real projects from BraveProgrammer. Learn web development with React, Next.js, and TypeScript.

Navigation

  • Home
  • Projects
  • Blogs
  • Courses

Resources

  • About
  • Lessons
  • Teach on BraveProgrammer

© 2026 BraveProgrammer. All rights reserved.

Async Await and Futures | Rust Fundamentals lesson | BraveProgrammer
  1. Courses
  2. /
  3. Rust Fundamentals

Lesson 34 of 50

·rust

Async Await and Futures

15 minutes

Course progress68%

Async Await and Futures

A Future is a value that may not have completed yet. The await keyword drives it to completion.

use std::future::Future;

fn simple_future() -> impl Future<Output = i32> {
    async {  }
}


  () {
      = ().;
    (\
42
#[tokio::main]
async
fn
main
let
value
simple_future
await
println!
"Future resolved to {}\", value); }
Make it stickPractice what you've learned1 quiz · 1 practical test · Optional activities from Rust FundamentalsBrowse activities
Previous lessonAsync Programming BasicsContinue to lesson 35Threads and ConcurrencyBack to Rust Fundamentals curriculum