- Introduction
- 1. Hello World
❱
- 1.1. Comments
- 1.2. Formatted print
❱
- 1.2.1. Debug
- 1.2.2. Display
❱
- 1.2.2.1. Testcase: List
- 1.2.3. Formatting
- 2. Primitives
❱
- 2.1. Literals and operators
- 2.2. Tuples
- 2.3. Arrays and Slices
- 3. Custom Types
❱
- 3.1. Structures
- 3.2. Enums
❱
- 3.2.1. use
- 3.2.2. Testcase: linked-list
- 3.3. constants
- 4. Variable Bindings
❱
- 4.1. Mutability
- 4.2. Scope and Shadowing
- 4.3. Freezing
- 5. Types
❱
- 5.1. Literals
- 5.2. Inference
- 5.3. Aliasing
- 6. Conversion
❱
- 6.1. From and Into
- 6.2. TryFrom and TryInto
- 6.3. To and from Strings
- 7. Expressions
- 8. Flow of Control
❱
- 8.1. if/else
- 8.2. loop
❱
- 8.2.1. Returning from loops
- 8.3. while
- 8.4. for and range
- 8.5. match
❱
- 8.5.1. Destructuring
❱
- 8.5.1.1. enums
- 8.5.1.2. structs
- 8.6. if let
- 8.7. while let
- 9. Functions
❱
- 9.1. Methods
- 9.2. Closures
❱
- 9.2.1. Capturing
- 9.2.2. As input parameters
- 9.2.3. Type anonymity
- 9.2.4. Input functions
- 9.2.5. Examples in core
❱
- 9.2.5.1. Iterator::sum
- 9.2.5.2. Searching through iterators
- 9.3. Higher Order Functions
- 10. Modules
❱
- 10.1. Visibility
- 10.2. Struct visibility
- 10.3. The use declaration
- 10.4. super and self
- 10.5. File hierarchy
- 11. Crates
- 12. Scarb
❱
- 12.1. Dependencies
- 12.2. Tests
- 13. Attributes
❱
- 13.1. unused_imports
- 13.2. cfg
- 14. Generics
❱
- 14.1. Functions
- 14.2. Traits
- 14.3. Implementation
- 14.4. Bounds
❱
- 14.4.1. Testcase: empty bounds
- 14.5. Multiple bounds
- 14.6. Associated items
❱
- 14.6.1. The Problem
- 14.6.2. Associated types
- 15. Scoping rules
❱
- 15.1. RAII
- 15.2. Ownership, and moves
❱
- 15.2.1. Mutability
- 15.3. Retaining Ownership
❱
- 15.3.1. Snapshots
- 15.3.2. References
- 16. Traits
❱
- 16.1. Derive
- 16.2. Operator Overloading
- 16.3. Drop and Destruct
- 16.4. Iterators
- 16.5. Clone
- 16.6. Disambiguating overlapping traits
- 17. Error handling
❱
- 17.1. panic
- 17.2. Option & unwrap
❱
- 17.2.1. Unpacking options with ?
- 17.2.2. Combinators: map
- 17.2.3. Combinators: and_then
- 17.2.4. Defaults: or, or_else
- 17.3. Result
❱
- 17.3.1. map for Result
- 17.3.2. aliases for Result
- 17.3.3. Early returns
- 17.3.4. Introducing ?
- 17.4. Multiple error types
❱
- 17.4.1. Pulling Results out of Options
- 17.4.2. Defining an error type
- 18. Core library types
❱
- 18.1. Dictionaries
- 18.2. Box and Memory Segments
- 18.3. ByteArrays
- 18.4. Option
- 18.5. Result
❱
- 18.5.1. ?
- 18.6. panic!
- 19. Testing
❱
- 19.1. Unit testing
- 19.2. Integration testing
- 19.3. Dev-dependencies
- 20. Meta
❱
- 20.1. Documentation
- 20.2. Playground