1. Rust for C programmers
    1. Why Rust
    2. What makes Rust special
    3. About the book
    4. About the authors
  2. The basic structure of a Rust program
    1. The compilation process
    2. The program structure
    3. The main() function
    4. Variables and mutability
    5. Data types
    6. Constants and statics
    7. Functions
    8. Control flow
    9. Modules and crates
    10. Use statement and namespacing
    11. Traits
    12. Macros
    13. Error handling
    14. Memory safety and ownership
    15. Expressions and statements
    16. Code conventions and style
    17. Comments and documentation
    18. Additional topics
    19. Summary
  3. Installing Rust
    1. Rustup
    2. Using system package managers
    3. Experimenting in the playground
    4. IDE and editor support
    5. Summary
  4. Rustc and Cargo
    1. Compiling with Rustc
    2. Introduction to Cargo
    3. Further resources
  5. Common programming concepts
    1. Keywords
    2. Identifiers and allowed characters
    3. Expressions and statements
    4. Data types
    5. Variables and mutability
    6. Operators
    7. Numeric literals and their type
    8. Overflow for arithmetic operations
    9. Performance for numeric types
    10. Comments in Rust
    11. Summary
  6. Ownership and memory management
    1. Overview of ownership
    2. Moves, cloning, and copying
    3. Borrowing and references
    4. Borrowing rules in detail
    5. The string type
    6. Slices -- borrowing subranges
    7. Lifetimes of references
    8. Smart pointers
    9. Unsafe Rust
    10. Comparison with C
    11. Summary
  7. Control flow
    1. Conditional statements
    2. Match statement
    3. Loops
    4. Summary
  8. Functions
    1. The main function
    2. Defining and calling functions
    3. Function parameter types
    4. Returning values
    5. Nested functions and scope
    6. Default and named arguments
    7. Slices and Tuples as parameters
    8. Generics in functions
    9. Function pointers
    10. Recursion
    11. Inlining functions
    12. Method call syntax
    13. Function overloading
    14. Type inference for return types
    15. Variadic functions and macros
    16. Summary
    17. Exercises
  9. Structs
    1. Introduction
    2. Defining and instantiating
    3. Updating struct instances
    4. Tuple and unit like structs
    5. Methods, associated functions
    6. Getters and setters
    7. Structs and ownership
    8. Generic structs
    9. Derived traits
    10. Visibility
    11. Summary
    12. Exercises
  10. Enums and pattern matching
    1. Understanding enums
    2. Basic enums
    3. Enums with data
    4. Using enums in code
    5. Memory layout of enums
    6. Enums vs inheritance in OOP
    7. Limitations of enums
    8. Enums as function parameters
    9. Option and Result types
    10. Summary
  11. Traits, generics, and lifetimes
    1. Understanding traits
    2. Generics in Rust
    3. Lifetimes in Rust
    4. Traits in depth
    5. Advanced generics
    6. Summary
  12. Closures in Rust
    1. Introduction to closures
    2. Using closures
    3. Closure traits
    4. Working with closures
    5. Closures and concurrency
    6. Performance considerations
    7. Additional topics
    8. Summary
  13. Mastering iterators
    1. Introduction to iterators
    2. Common iterator methods
    3. Creating custom iterators
    4. Advanced iterator concepts
    5. Performance considerations
    6. Practical examples
    7. Additional topics
    8. Iterators for complex structures
    9. Summary
  14. Option types
    1. Introduction to option types
    2. Using option types
    3. Option types in other languages
    4. Performance considerations
    5. Benefits of using option types
    6. Best practices
    7. Practical examples
    8. Summary
  15. Error handling with Result
    1. Introduction to error handling
    2. The Result type
    3. Error propagation with ?
    4. Unrecoverable errors
    5. Handling multiple error types
    6. Best practices
    7. Summary
  16. Type conversions
    1. Introduction to type conversions
    2. Casting with as
    3. Using the From and Into traits
    4. Fallible conversions
    5. Reinterpreting data types
    6. String processing and parsing
    7. Best practices
    8. Summary
  17. Crates, modules, and packages
    1. Packages
    2. Crates
    3. Modules
    4. Best practices
    5. Summary
  18. Common collection types
    1. Overview
    2. Vectors
    3. Strings
    4. HashMaps
    5. Other collection
    6. Performance considerations
    7. Selection guide
    8. Summary
  19. Smart pointers
    1. The concept of smart pointers
    2. Smart pointers vs. references
    3. Comparing to C and C++
    4. Box -- a simple smart pointer
    5. Rc -- shared_ownership
    6. Interior mutability
    7. Shared ownership across threads
    8. Weak -- non owning references
    9. Summary
  20. Object oriented programming
    1. Definition of OOP
    2. Problems and criticisms
    3. OOP in Rust
    4. Trait objects
    5. Disadvantages of trait objects
    6. Trait objects vs. enums
    7. Modules and encapsulation
    8. Generics instead of OOP
    9. Serializing trait objects
    10. Summary
  21. Patterns and pattern matching
    1. C's switch statement
    2. Overview of patterns
    3. Refutable vs irrefutable patterns
    4. Variable assignment as a pattern
    5. Match expressions
    6. Matching enums
    7. Matching literals and ranges
    8. Underscores and the .. pattern
    9. Variable bindings with @
    10. Match guards
    11. Or patterns and guards
    12. Destructuring complex types
    13. Matching boxed types
    14. If let and while let
    15. The let else construct
    16. If let chains
    17. Patterns in for loops
    18. Nested patterns
    19. Partial moves
    20. Performance considerations
    21. Summary
  22. Fearless concurrency
    1. Concurrency, processes, threads
    2. Concurrency vs true parallelism
    3. Threads vs async
    4. Creating threads
    5. Sharing data between threads
    6. Channels for message passing
    7. Rayon for data parallelism
    8. SIMD
    9. Comparison to C++
    10. Send and sync traits
    11. Summary
  23. Mastering Cargo
    1. Overview
    2. Cargo's command line interface
    3. Directory structure
    4. Cargo TOML file
    5. Building and running projects
    6. Build profiles
    7. Testing and benchmarking
    8. Creating documentation
    9. Publishing a crate to crates.io
    10. Binary vs library crates
    11. Cargo workspaces
    12. Installing application packages
    13. Extending cargo
    14. Security considerations
    15. Summary
  24. Testing
    1. Overview
    2. Kinds of tests
    3. Creating and executing tests
    4. The Cargo test command
    5. Tests that should panic
    6. Test organization
    7. Documentation tests
    8. Development dependencies
    9. Benchmarking
    10. Profiling
    11. Summary
  25. Unsafe Rust
    1. Overview
    2. Unsafe blocks and functions
    3. Raw pointers
    4. Memory handling
    5. Casting with transmute()
    6. Calling C functions (FFI)
    7. Unions
    8. Mutable global variables
    9. Unsafe traits
    10. Splitting a mutable slice
    11. Tools support
    12. Miri example
    13. Inline assembly
    14. Summary
  26. Macros
  27. Async
  28. Private policy