Backend development

Stage 1 · Lesson 2 of 10

Rust syntax, structs, enums and traits

Your language and how HTTP works

Rust looks familiar at first: let bindings, functions, if, loops, and with methods in impl blocks. Variables cannot change unless you declare them with let mut. Enums are the part to master early.

Each variant can carry its own data, and match makes you handle every variant, which the compiler checks. Option<T> stands for a value that may be missing, so there is no null. describe shared behaviour, much like interfaces in other languages, and is built on them.

Run cargo fmt and cargo clippy from the first day; clippy is a linter that suggests more idiomatic ways to write your code.

Common trapporting habits from Java or Python, such as deep class hierarchies and null checks, instead of learning to model data with enums and traits.

A question to check yourself, an AI practice session and 2 cheat sheet entries come with the full roadmap. Unlock

Resources for this stage

Start with· follow one of these

  • BookFree
    The Rust Programming Language

    The Rust Project · Beginner

    The official book, free online: read ownership, enums, error handling and traits slowly

  • GuideFree
    Tokio Tutorial

    Tokio · Intermediate

    The official Tokio tutorial: tasks, shared state, channels and the async model Axum runs on

Practise

  • Small exercises that follow the book chapter by chapter, checked in your terminal

  • Your language track: small exercises with free mentor feedback on idiomatic code

Keep handy

  • Runnable examples to look up while you write: traits, generics, errors and Cargo

  • Read the HTTP overview, methods, headers and status code pages until they feel obvious

Also worth your time

Mark this stage as not done?