1. Rust for C programmers
    1. Why Rust
    2. What makes Rust special
    3. About the book
    4. About the authors
  2. The basic tructure of a Rust program
    1. The build system
    2. The main function
    3. Variables and mutability
    4. Data types
    5. Constants and statics
    6. Functions and control flow
    7. Modules and crates
    8. Use statements and namespacing
    9. Traits and implementations
    10. Macros
    11. Error handling
    12. Memory safety and ownership
    13. Expressions_and_Statements
    14. Code conventions and style
    15. Comments and documentation
    16. Additional topics
    17. Summary
    18. Closing thoughts
  3. Installing Rust
    1. For Linux users
    2. Experimenting in the playground
  4. Rustc and Cargo
    1. Compiling with Rustc
    2. Introduction to Cargo
    3. Further resources
  5. Common_programming_concepts
    1. Keywords
    2. Expressions and statements
    3. Data types
    4. Variables and mutability
    5. Operators
    6. Numeric literals and their type
    7. Overflow for arithmetic operations
    8. Performance for numeric types
    9. Comments in Rust
    10. Summary
    11. Closing thoughts
  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
    12. Closing thoughts
  7. Control flow
    1. Conditional statements
    2. Loops
    3. Control flow in Rust and C
    4. Summary
    5. Closing_thoughts
  8. Functions
    1. Defining and calling functions
    2. The main function
    3. Parameters and return types
    4. Default and named arguments
    5. Slices as parameters
    6. Tuples as parameters
    7. Function pointers
    8. Nested functions and scope
    9. Generics in functions
    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
    18. Closing thoughts
  9. Structs
    1. Defining structs
    2. Instantiating structs
    3. Updating struct instances
    4. Tuple structs
    5. Unit like structs
    6. Methods, associated functions
    7. The self parameter
    8. Getters and setters
    9. Structs and ownership
    10. References and lifetimes
    11. Generic structs
    12. Rust structs versus classes
    13. Derived traits
    14. Additional topics
    15. Exercises
    16. Summary
    17. Closing thoughts
  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. Closing thoughts
  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
    7. Closing thoughts
  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. Unrecoverable errors
    3. The Result type
    4. Error propagation with ?
    5. Practical examples
    6. Handling multiple error types
    7. Best practices
    8. 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. The prelude
    5. Best practices
    6. Summary
  18. Common collection types
    1. Vectors
    2. Strings
    3. HashMaps
    4. Other collection
    5. Performance considerations
    6. Selection guide
    7. 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. Patterns in for loops
    17. Nested patterns
    18. Performance considerations
    19. Summary
  22. Fearless concurrency
    1. Concurrency, processes, threads
    2. Concurrency vs true parallelism
    3. Threads vs async
    4. IO bound vs CPU bound tasks
    5. Creating threads
    6. Sharing data between threads
    7. Channels for message passing
    8. Rayon for data parallelism
    9. SIMD
    10. Comparison to C++
    11. Send and sync traits
    12. Summary
  23. Useful traits
  24. Using Cargo
  25. Testing
  26. Macros
  27. Async
  28. Unsafe Rust
  29. Appendix
  30. Private policy