Rust Tutorial
Course Contents
Rust Fundamentals
- Rust Introduction
- Installing Rust
- Rust Get Started (Hello World)
- How Rust Works: Compiled and Memory-Safe
- Cargo and Crates
- The rustc and cargo build/run Commands
Rust Basics
- Variables and Mutability
- Data Types
- Constants
- Shadowing
- Type Conversion
- Printing and Formatting (println!)
Control Flow
- if and else
- loop, while, and for
- match Expressions
- if let and while let
- Loop Labels and Breaking with Values
Ownership
- Ownership Explained
- Move Semantics
- Clone and Copy
- References and Borrowing
- Mutable References and the Borrow Checker
- The Slice Type
Functions and Closures
- Functions in Rust
- Parameters and Return Values
- Closures
- Closures as Function Parameters
- Higher-Order Functions and Iterators Preview
Structs and Enums
Pattern Matching
- Pattern Matching Fundamentals
- Matching on Enums
- Destructuring Structs and Tuples
- Match Guards
- The _ Wildcard and Exhaustiveness
Error Handling
- Error Handling in Rust
- The Result Enum
- The ? Operator
- panic! and Unrecoverable Errors
- Custom Error Types
Collections
Traits and Generics
Iterators and Functional Patterns
- The Iterator Trait
- map, filter, and collect
- fold and reduce
- Lazy Evaluation in Iterators
- Chaining Iterator Adapters
Lifetimes
Modules and Packages
- Organizing Code with Modules
- pub and Visibility
- Splitting Modules into Files
- Crates and Packages
- Adding Dependencies with Cargo
Concurrency
- Concurrency in Rust
- Threads with std::thread
- Message Passing with Channels
- Shared State with Mutex and Arc
- Send and Sync
