1. What's Different About This Book?
  2. The Rust Programming Language
  3. Foreword
  4. Introduction
  5. Getting Started
    1. Installation
    2. Hello, World!
    3. Hello, Cargo!
  6. Programming a Guessing Game
  7. Common Programming Concepts
    1. Variables and Mutability
    2. Data Types
    3. Functions
    4. Comments
    5. Control Flow
  8. Understanding Ownership
    1. What is Ownership?
    2. References and Borrowing
    3. Fixing Ownership Errors
    4. The Slice Type
    5. Ownership Recap
  9. Using Structs to Structure Related Data
    1. Defining and Instantiating Structs
    2. An Example Program Using Structs
    3. Methods
  10. Enums and Pattern Matching
    1. Defining an Enum
    2. The match Control Flow Construct
    3. Concise Control Flow with if let and let...else
    4. Ownership Inventory #1
  11. Packages, Crates, and Modules
    1. Packages and Crates
    2. Control Scope and Privacy with Modules
    3. Paths for Referring to an Item in the Module Tree
    4. Bringing Paths Into Scope with the use Keyword
    5. Separating Modules into Different Files
  12. Common Collections
    1. Storing Lists of Values with Vectors
    2. Storing UTF-8 Encoded Text with Strings
    3. Storing Keys with Associated Values in Hash Maps
    4. Ownership Inventory #2
  13. Error Handling
    1. Unrecoverable Errors with panic!
    2. Recoverable Errors with Result
    3. To panic! or Not to panic!
  14. Generic Types, Traits, and Lifetimes
    1. Generic Data Types
    2. Defining Shared Behavior with Traits
    3. Validating References with Lifetimes
    4. Ownership Inventory #3
  15. Writing Automated Tests
    1. How to Write Tests
    2. Controlling How Tests Are Run
    3. Test Organization
  16. An I/O Project: Building a Command Line Program
    1. Accepting Command Line Arguments
    2. Reading a File
    3. Refactoring to Improve Modularity and Error Handling
    4. Adding Functionality with Test Driven Development
    5. Working with Environment Variables
    6. Redirecting Errors to Standard Error
  17. Functional Language Features: Iterators and Closures
    1. Closures
    2. Processing a Series of Items with Iterators
    3. Improving Our I/O Project
    4. Performance in Loops vs. Iterators
  18. More about Cargo and Crates.io
    1. Customizing Builds with Release Profiles
    2. Publishing a Crate to Crates.io
    3. Cargo Workspaces
    4. Installing Binaries with cargo install
    5. Extending Cargo with Custom Commands
  19. Smart Pointers
    1. Using Box<T> to Point to Data on the Heap
    2. Treating Smart Pointers Like Regular References
    3. Running Code on Cleanup with the Drop Trait
    4. Rc<T>, the Reference Counted Smart Pointer
    5. RefCell<T> and the Interior Mutability Pattern
    6. Reference Cycles Can Leak Memory
  20. Fearless Concurrency
    1. Using Threads to Run Code Simultaneously
    2. Transfer Data Between Threads with Message Passing
    3. Shared-State Concurrency
    4. Extensible Concurrency with Send and Sync
  21. Fundamentals of Asynchronous Programming: Async, Await, Futures, and Streams
    1. Futures and the Async Syntax
    2. Applying Concurrency with Async
    3. Working With Any Number of Futures
    4. Streams: Futures in Sequence
    5. A Closer Look at the Traits for Async
    6. Futures, Tasks, and Threads
  22. Object Oriented Programming Features
    1. Characteristics of Object-Oriented Languages
    2. Using Trait Objects to Abstract over Shared Behavior
    3. Implementing an Object-Oriented Design Pattern
    4. Ownership Inventory #4
    5. Design Trade-offs
  23. Patterns and Matching
    1. All the Places Patterns Can Be Used
    2. Refutability: Whether a Pattern Might Fail to Match
    3. Pattern Syntax
  24. Advanced Features
    1. Unsafe Rust
    2. Advanced Traits
    3. Advanced Types
    4. Advanced Functions and Closures
    5. Macros
  25. Final Project: Building a Multithreaded Web Server
    1. Building a Single-Threaded Web Server
    2. From Single-Threaded to Multithreaded Server
    3. Graceful Shutdown and Cleanup
  26. End of Experiment
  27. Appendix
    1. A - Keywords
    2. B - Operators and Symbols
    3. C - Derivable Traits
    4. D - Useful Development Tools
    5. E - Editions
    6. F - Translations of the Book
    7. G - How Rust is Made and “Nightly Rust”