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. Summary
  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 in 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. The String type
    5. Slices -- borrowing subranges
    6. Lifetimes of references
    7. Smart pointers
    8. Unsafe Rust
    9. Comparison with C
    10. Summary
  7. Control flow
    1. Conditional statements
    2. Match statement
    3. Loops
    4. Summary
  8. Functions and methods
    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. Generic 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. Default values
    5. Tuple and unit like structs
    6. Methods, associated functions
    7. Getters and setters
    8. Structs and ownership
    9. Generic structs
    10. Derived traits
    11. Memory layout
    12. Visibility
    13. Summary
    14. 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. Common use cases
    9. Option and Result types
    10. Summary
  11. Traits, generics, and lifetimes
    1. Understanding traits
    2. Generics in Rust
    3. Lifetimes in Rust
    4. Further trait features
    5. Summary
  12. Closures in Rust
    1. Introduction to closures
    2. Closure traits
    3. Using closures
    4. Performance considerations
    5. Advanced_topics
    6. Summary
  13. Working with Iterators
    1. Introduction to iterators
    2. Common iterator methods
    3. Creating custom iterators
    4. Advanced iterator concepts
    5. Performance considerations
    6. Practical examples
    7. Iterators for complex structures
    8. Summary
  14. Option types
    1. Introduction to option types
    2. Using option types
    3. Performance considerations
    4. Best practices
    5. Practical examples
    6. Summary
  15. Error handling with Result
    1. Recoverable vs. unrec. errors
    2. The Result type
    3. Error propagation with ?
    4. Handling multiple error types
    5. Unrecoverable errors
    6. Best practices
    7. Summary
  16. Type conversions
    1. Explicit and safe 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 and 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. Destructuring complex types
    12. Matching boxed types
    13. If let and while let
    14. The let else construct
    15. If let chains
    16. Patterns in for loops
    17. Nested patterns
    18. Partial moves
    19. Performance considerations
    20. 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. Working with 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. Security considerations
    14. Summary
  24. Testing
    1. Overview
    2. Writing basic tests
    3. Test organization
    4. Controlling test execution
    5. Testing panics and errors
    6. Documentation tests
    7. Development dependencies
    8. Benchmarking
    9. Profiling
    10. Summary
  25. Unsafe Rust
    1. Overview
    2. Unsafe blocks and functions
    3. Raw pointers
    4. Calling C functions (FFI)
    5. Mutable global variables
    6. Unsafe traits
    7. Unions
    8. Advanced unsafe operations
    9. Verifying unsafe code
    10. Summary
  26. Macros
  27. Async
  28. Private policy