Overview of all stages
Stage 1: The Basics
- 1.1 Introduction
- 1.2 The Rust Playground
- 1.3 Variables
- 1.4 Changing Variables
- 1.5 Basic Types
- 1.6 Basic Type Conversion
- 1.7 Constants
- 1.8 Arrays
- 1.9 Functions
- 1.10 Multiple Return Values
- 1.11 Returning Nothing
- 1.12 Macros
- 1.13 Compiler Messages
- 1.14 Summary
Stage 2: Rust installation and local development
- 2.1 Introduction
- 2.2 Installation
- 2.3 rustup
- 2.4 cargo
- 2.5 Managing Dependencies With cargo
- 2.6 cargo Subcommands
- 2.7 Setup Visual Studio Code
- 2.8 Writing A Hello World Program
- 2.9 Reading Command Line Arguments
- 2.10 How to test functions
- 2.11 Summary
Stage 3: Basic Control Flow
- 3.1 Introduction
- 3.2 if / else
- 3.3 loop
- 3.4 Returning Values From loop
- 3.5 while
- 3.6 for
- 3.7 match
- 3.8 Returning Values From Block Expressions
- 3.9 Summary
Stage 4: Basic Data Structure Types
- 4.1 Introduction
- 4.2 Structures
- 4.3 Calling Methods
- 4.4 Memory
- 4.5 Creating Data In Memory
- 4.6 Tuple-like Structs
- 4.7 Unit-like Structs
- 4.8 Enums
- 4.9 Enums With Data
- 4.10 Summary
Stage 5: Generic Types
- 5.1 Introduction
- 5.2 What Are Generic Types
- 5.3 Representing Nothing
- 5.4 Option
- 5.5 Result
- 5.6 Failable Main
- 5.7 Error Handling
- 5.8 Ugly Option / Result Handling
- 5.9 Vectors
- 5.10 Summary
Stage 6: Ownership & Borrowing Data
- 6.1 Introduction
- 6.2 Ownership
- 6.3 Scope-based Resource Management
- 6.4 Dropping Is Hierarchical
- 6.5 Moving Ownership
- 6.6 Returning Ownership
- 6.7 Borrowing Ownership With References
- 6.8 Borrowing Mutable Ownership With References
- 6.9 Dereferencing
- 6.10 Passing Around Borrowed Data
- 6.11 References Of References
- 6.12 Explicit Lifetimes
- 6.13 Multiple Lifetimes
- 6.14 Static Lifetimes
- 6.15 Lifetimes In Data Types
- 6.16 Summary
Stage 7: Text
- 7.1 Introduction
- 7.2 String Literals
- 7.3 What Is UTF-8?
- 7.4 Escaping Characters
- 7.5 Multi-line String Literals
- 7.6 Raw String Literals
- 7.7 String Literals From Files
- 7.8 String Slice
- 7.9 Chars
- 7.10 String
- 7.11 Text As Function Parameters
- 7.12 Building Strings
- 7.13 Formatting Strings
- 7.14 Converting Strings
- 7.15 Useful String Methods
- 7.16 Regular Expressions
- 7.17 Summary
Stage 8: Object Oriented Programming (OOP)
- 8.1 Introduction
- 8.2 What Is Object Oriented Programming (OOP)?
- 8.3 Rust Is Not OOP
- 8.4 Encapsulation With Methods
- 8.5 Abstraction With Selective Exposure
- 8.6 Polymorphism With Traits
- 8.7 Implemented Methods On Traits
- 8.8 Trait Inheritance
- 8.9 Dynamic vs Static Dispatch
- 8.10 Trait Objects
- 8.11 Handling Unsized Data
- 8.12 Generic Functions
- 8.13 Generic Functions Shorthand
- 8.14 Box
- 8.15 Generic Structs Revisited
- 8.16 Summary
Stage 9: Smart Pointers
- 9.1 Introduction
- 9.2 References Revisited
- 9.3 Raw Pointers
- 9.4 Dereferencing Revisited
- 9.5 The Dereference Operator *
- 9.6 The Dot Operator .
- 9.7 Smart Pointers
- 9.8 Smart Unsafe Code
- 9.9 Familiar Friends
- 9.10 Heap Allocated Memory
- 9.11 Failable Main Revisted
- 9.12 Referencing Counting
- 9.13 Sharing Access
- 9.14 Sharing Across Threads
- 9.15 Combining Smart Pointers
- 9.16 Summary
Stage 10: Project Organization and Stucture
- 10.1 Introduction
- 10.2 Modules
- 10.3 Writing A Program
- 10.4 Writing A Library
- 10.5 Referencing Other Modules And Crates
- 10.6 Referencing Multiple Items
- 10.7 Creating Modules
- 10.8 Module Hierarchy
- 10.9 Inline Modules
- 10.10 Internal Module Referencing
- 10.11 Exporting
- 10.12 struct Visibility
- 10.13 Prelude
- 10.14 Your Own Prelude
- 10.15 Cargo.toml File
- 10.16 Rust Editions
- 10.17 Summary