1. Introduction
  2. 1. Hello World
    ❱
    1. 1.1. Comments
    2. 1.2. Formatted print
      ❱
      1. 1.2.1. Debug
      2. 1.2.2. Display
        ❱
        1. 1.2.2.1. Testcase: List
      3. 1.2.3. Formatting
  3. 2. Primitives
    ❱
    1. 2.1. Literals and operators
    2. 2.2. Tuples
    3. 2.3. Arrays and Slices
  4. 3. Custom Types
    ❱
    1. 3.1. Structures
    2. 3.2. Enums
      ❱
      1. 3.2.1. use
      2. 3.2.2. C-like
      3. 3.2.3. Testcase: linked-list
    3. 3.3. constants
  5. 4. Variable Bindings
    ❱
    1. 4.1. Mutability
    2. 4.2. Scope and Shadowing
    3. 4.3. Declare first
    4. 4.4. Freezing
  6. 5. Types
    ❱
    1. 5.1. Casting
    2. 5.2. Literals
    3. 5.3. Inference
    4. 5.4. Aliasing
  7. 6. Conversion
    ❱
    1. 6.1. From and Into
    2. 6.2. TryFrom and TryInto
    3. 6.3. To and from Strings
  8. 7. Expressions
  9. 8. Flow of Control
    ❱
    1. 8.1. if/else
    2. 8.2. loop
      ❱
      1. 8.2.1. Nesting and labels
      2. 8.2.2. Returning from loops
    3. 8.3. while
    4. 8.4. for and range
    5. 8.5. match
      ❱
      1. 8.5.1. Destructuring
        ❱
        1. 8.5.1.1. tuples
        2. 8.5.1.2. enums
        3. 8.5.1.3. pointers/ref
        4. 8.5.1.4. structs
      2. 8.5.2. Guards
      3. 8.5.3. Binding
    6. 8.6. if let
    7. 8.7. while let
  10. 9. Functions
    ❱
    1. 9.1. Methods
    2. 9.2. Closures
      ❱
      1. 9.2.1. Capturing
      2. 9.2.2. As input parameters
      3. 9.2.3. Type anonymity
      4. 9.2.4. Input functions
      5. 9.2.5. As output parameters
      6. 9.2.6. Examples in std
        ❱
        1. 9.2.6.1. Iterator::any
        2. 9.2.6.2. Searching through iterators
    3. 9.3. Higher Order Functions
    4. 9.4. Diverging functions
  11. 10. Modules
    ❱
    1. 10.1. Visibility
    2. 10.2. Struct visibility
    3. 10.3. The use declaration
    4. 10.4. super and self
    5. 10.5. File hierarchy
  12. 11. Crates
    ❱
    1. 11.1. Creating a Library
    2. 11.2. Using a Library
  13. 12. Cargo
    ❱
    1. 12.1. Dependencies
    2. 12.2. Conventions
    3. 12.3. Tests
    4. 12.4. Build Scripts
  14. 13. Attributes
    ❱
    1. 13.1. dead_code
    2. 13.2. Crates
    3. 13.3. cfg
      ❱
      1. 13.3.1. Custom
  15. 14. Generics
    ❱
    1. 14.1. Functions
    2. 14.2. Implementation
    3. 14.3. Traits
    4. 14.4. Bounds
      ❱
      1. 14.4.1. Testcase: empty bounds
    5. 14.5. Multiple bounds
    6. 14.6. Where clauses
    7. 14.7. New Type Idiom
    8. 14.8. Associated items
      ❱
      1. 14.8.1. The Problem
      2. 14.8.2. Associated types
    9. 14.9. Phantom type parameters
      ❱
      1. 14.9.1. Testcase: unit clarification
  16. 15. Scoping rules
    ❱
    1. 15.1. RAII
    2. 15.2. Ownership and moves
      ❱
      1. 15.2.1. Mutability
      2. 15.2.2. Partial moves
    3. 15.3. Borrowing
      ❱
      1. 15.3.1. Mutability
      2. 15.3.2. Aliasing
      3. 15.3.3. The ref pattern
    4. 15.4. Lifetimes
      ❱
      1. 15.4.1. Explicit annotation
      2. 15.4.2. Functions
      3. 15.4.3. Methods
      4. 15.4.4. Structs
      5. 15.4.5. Traits
      6. 15.4.6. Bounds
      7. 15.4.7. Coercion
      8. 15.4.8. Static
      9. 15.4.9. Elision
  17. 16. Traits
    ❱
    1. 16.1. Derive
    2. 16.2. Returning Traits with dyn
    3. 16.3. Operator Overloading
    4. 16.4. Drop
    5. 16.5. Iterators
    6. 16.6. impl Trait
    7. 16.7. Clone
    8. 16.8. Supertraits
    9. 16.9. Disambiguating overlapping traits
  18. 17. macro_rules!
    ❱
    1. 17.1. Syntax
      ❱
      1. 17.1.1. Designators
      2. 17.1.2. Overload
      3. 17.1.3. Repeat
    2. 17.2. DRY (Don't Repeat Yourself)
    3. 17.3. DSL (Domain Specific Languages)
    4. 17.4. Variadics
  19. 18. Error handling
    ❱
    1. 18.1. panic
    2. 18.2. Option & unwrap
      ❱
      1. 18.2.1. Unpacking options with ?
      2. 18.2.2. Combinators: map
      3. 18.2.3. Combinators: and_then
    3. 18.3. Result
      ❱
      1. 18.3.1. map for Result
      2. 18.3.2. aliases for Result
      3. 18.3.3. Early returns
      4. 18.3.4. Introducing ?
    4. 18.4. Multiple error types
      ❱