1. Foreword
  2. Introduction
  3. Getting Started
    1. Installation
    2. Hello, World!
    3. Hello, Cargo!
  4. Programming a Guessing Game
  5. Common Programming Concepts
    1. Variables and Mutability
    2. Data Types
    3. How Functions Work
    4. Comments
    5. Control Flow
  6. Understanding Ownership
    1. What is Ownership?
    2. References & Borrowing
    3. Slices
  7. Using Structs to Structure Related Data
    1. Defining and Instantiating Structs
    2. An Example Program Using Structs
    3. Method Syntax
  8. Enums and Pattern Matching
    1. Defining an Enum
    2. The match Control Flow Operator
    3. Concise Control Flow with if let
  9. Packages, Crates, and Modules
    1. Packages and crates for making libraries and executables
    2. Modules and use to control scope and privacy
  10. Common Collections
    1. Vectors
    2. Strings
    3. Hash Maps
  11. Error Handling
    1. Unrecoverable Errors with panic!
    2. Recoverable Errors with Result
    3. To panic! or Not to panic!
  12. Generic Types, Traits, and Lifetimes
    1. Generic Data Types
    2. Traits: Defining Shared Behavior
    3. Validating References with Lifetimes
  13. Testing
    1. Writing tests
    2. Running tests
    3. Test Organization
  14. 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. Developing the Library’s Functionality with Test Driven Development
    5. Working with Environment Variables
    6. Writing Error Messages to Standard Error Instead of Standard Output
  15. Functional Language Features: Iterators and Closures
    1. Closures: Anonymous Functions that Can Capture Their Environment
    2. Processing a Series of Items with Iterators
    3. Improving Our I/O Project
    4. Comparing Performance: Loops vs. Iterators
  16. 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 from Crates.io with cargo install
    5. Extending Cargo with Custom Commands
  17. Smart Pointers
    1. Box<T> Points to Data on the Heap and Has a Known Size
    2. The Deref Trait Allows Access to the Data Through a Reference
    3. The Drop Trait Runs Code on Cleanup
    4. Rc<T>, the Reference Counted Smart Pointer
    5. RefCell<T> and the Interior Mutability Pattern
    6. Creating Reference Cycles and Leaking Memory is Safe
  18. Fearless Concurrency
    1. Threads
    2. Message Passing
    3. Shared State
    4. Extensible Concurrency: Sync and Send
  19. Object Oriented Programming Features of Rust
    1. Characteristics of Object-Oriented Languages
    2. Using Trait Objects that Allow for Values of Different Types
    3. Implementing an Object-Oriented Design Pattern
  20. Patterns Match the Structure of Values
    1. All the Places Patterns May be Used
    2. Refutability: Whether a Pattern Might Fail to Match
    3. All the Pattern Syntax
  21. Advanced Features
    1. Unsafe Rust
    2. Advanced Lifetimes
    3. Advanced Traits
    4. Advanced Types
    5. Advanced Functions & Closures
    6. Macros
  22. Final Project: Building a Multithreaded Web Server
    1. A Single Threaded Web Server
    2. Turning our Single Threaded Server into a Multithreaded Server
    3. Graceful Shutdown and Cleanup
  23. Appendix
    1. A - Keywords
    2. B - Operators and Symbols
    3. C - Derivable Traits
    4. D - Useful Development Tools
    5. E - Editions
    6. F - Translations
    7. G - How Rust is Made and “Nightly Rust”