Guides
The Rust Expression Guide
22 modules
- 1. Expression-Oriented Rust
- 2. Transforming Values with
map - 3. Chaining Computation with
and_then - 4. Converting
OptionintoResultwithok_or_else - 5. Reshaping Errors with
ResultCombinators - 6. Writing Straight-Line Fallible Code with
? - 7. Choosing
matchon Purpose - 8. Flattening Control Flow with
if letandlet-else - 9. Filtering and Transforming with
filter_map - 10. Collecting Iterator Pipelines with
collect - 11. Finding and Short-Circuiting with Iterator Methods
- 12. Flattening and Expanding with
flattenandflat_map - 13. Aggregating Data with
fold - 14. Coordinating Iteration with
enumerateandzip - 15. Writing Clear Conditions and Predicates
- 16. Choosing Between Loops and Iterator Chains
- 17. Refactoring Away Temporary Variables
- 18. Shrinking and Isolating Error Paths
- 19. Keeping the Happy Path Obvious
- 20. Avoiding Clever-Looking Rust
- 21. Refactoring Verbose Rust into Idiomatic Expressions
- 22. Refactoring Dense Rust into Clear Rust
