Collections
Vec for dynamic arrays, String for owned UTF-8 text, and HashMap for key-value storage -- creating, accessing, iterating, and common patterns.
Vec for dynamic arrays, String for owned UTF-8 text, and HashMap for key-value storage -- creating, accessing, iterating, and common patterns.
Spawning threads, move closures for threads, message passing with channels (mpsc), shared state with Arc and Mutex, the Send and Sync traits, and an introduction to async/await with tokio.
if/else as expressions, loop, while, for with ranges and iterators, break and continue with labels, early introduction to match, and returning values from blocks.
Building for release, cross-compilation, creating a systemd service, setting up nginx as a reverse proxy, HTTPS with Let's Encrypt, Docker multi-stage builds, and CI/CD with GitHub Actions.
panic! vs recoverable errors, Result in depth, the ? operator, unwrap and expect, custom error types, the From trait for error conversion, the thiserror crate, and when to panic vs return a Result.
Defining functions, parameters and return types, the difference between expressions and statements, implicit returns, the unit type, nested functions, diverging functions, and documentation comments.
What Rust is, why it exists, how it compares to other languages, installing the toolchain with rustup, writing your first program, understanding Cargo, setting up your editor, and reading compiler errors.
Closure syntax, capturing variables, Fn/FnMut/FnOnce traits, the Iterator trait, iterator adaptors like map/filter/fold/collect, chaining, lazy evaluation, and the difference between iter, into_iter, and iter_mut.
Why lifetimes exist, lifetime annotations in function signatures and structs, the three lifetime elision rules, the 'static lifetime, and common lifetime patterns and pitfalls.
Organizing code with mod, pub, and use, file-based module structure, re-exports, library vs binary crates, workspaces, Cargo.toml dependencies, crates.io, semantic versioning, and feature flags.
The stack and the heap, ownership rules, move semantics, the Copy and Clone traits, references and borrowing, mutable references, dangling references, String vs &str, and slices.
match exhaustiveness, destructuring structs and enums, if let, while let, the matches! macro, match guards, the wildcard pattern, nested patterns, and matching on Option and Result.
Eight hands-on project ideas -- from beginner to advanced -- to reinforce everything you learned in the Rust Beginners Guide.
Build a complete CLI application with clap for argument parsing, serde for JSON serialization, file-based storage, proper error handling, and a modular project structure.
Building a REST API with Actix Web: project setup, routes, handlers, extractors, JSON with serde, application state, middleware, CORS, and connecting to SQLite.
Defining structs, field init shorthand, tuple structs, unit structs, impl blocks, methods, associated functions, enums, enum variants with data, Option, and Result.
Unit tests with #[test], the cfg(test) module, assert macros, testing panics, integration tests in the tests/ directory, doc tests, cargo test options, and test organization.
Defining traits, implementing traits for types, default methods, generic functions and structs, trait bounds, where clauses, standard library traits, derive macros, and trait objects.
Declaring variables with let, understanding immutability by default, the mut keyword, shadowing, scalar types, compound types, type inference, type annotations, constants, and numeric overflow.