- 1 Getting Started
- 3 Common Concepts
- 4 Understanding Ownership
- 5 Using Structs to Structure Related Data
- 6 Enums and Pattern Matching
- 8 Common Collections
- 8-1 Storing Lists of Values with Vectors
- 8-2 Storing UTF-8 Encoded Text with Strings
- 8-3 Storing Keys with Associated Values in Hash Maps
- 9 Error Handling
- 10 Generic Types, Traits, and Lifetimes
- 10-1 Generic Data Types
- 10-2 Traits Defining Shared Behavior
- 10-3 Validating References with Lifetimes
- 10-3-1 Preventing Dangling References with Lifetimes
- 10-3-2 The Borrow Checker
- 10-3-3 Generic Lifetimes in Functions
- 10-3-4 Lifetime Annotation Syntax
- 10-3-5 Lifetime Annotations in Function Signatures
- 10-3-6 Thinking in Terms of Lifetimes
- 10-3-7 Lifetime Annotations in Struct Definitions
- 10-3-8 Lifetime Elision
- 10-3-9 Lifetime Annotations in Method Definitions
- 10-3-10 The Static Lifetime
- 10-4 Generic Type Parameters Trait Bounds and Lifetimes Together
- 11 Writing Automated Tests
- 18 Patterns and Matching
- 18-1 All the Places Patterns Can Be Used
- 18-2 Refutability Whether a Pattern Might Fail to Match
- 18-3 Pattern Syntax
1 | $ cargo new proj |