Stage 1 · Lesson 2 of 10
Rust syntax, structs, enums and traits
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
- BookFreeThe Rust Programming Language
The Rust Project · Beginner
The official book, free online: read ownership, enums, error handling and traits slowly
- GuideFreeTokio Tutorial
Tokio · Intermediate
The official Tokio tutorial: tasks, shared state, channels and the async model Axum runs on
Practise
Keep handy
Also worth your time
The DNS, TCP, TLS and HTTP steps behind every request your backend will handle