Tour of Rust
Lessons
Hello World!
Chapter 1 - The Basics
The Rust Playground
Variables
Changing Variables
Basic Types
Basic Type Conversion
Constants
Arrays
Functions
Multiple Return Values
Returning Nothing
Chapter 1 - Conclusion
Chapter 2 - Basic Control Flow
if/else
loop
while
for
match
Returning Values From loop
Returning Values From Block Expressions
Chapter 2 - Conclusion
Chapter 3 - Basic Data Structure Types
Structures
Calling Methods
Memory
Creating Data In Memory
Tuple-like Structs
Unit-like Structs
Enumerations
Enumerations With Data
Chapter 3 - Conclusion
Chapter 4 - Generic Types
What Are Generic Types?
Representing Nothing
Option
Result
Failable Main
Graceful Error Handling
Ugly Option/Result Handling
Vectors
Chapter 4 - Conclusion
Chapter 5 - Ownership & Borrowing Data
Ownership
Scope-Based Resource Management
Dropping is Hierarchical
Moving Ownership
Returning Ownership
Borrowing Ownership with References
Borrowing Mutable Ownership with References
Dereferencing
Passing Around Borrowed Data
References Of References
Explicit Lifetimes
Multiple Lifetimes
Static Lifetimes
Lifetimes In Data Types
Chapter 5 - Conclusion
Chapter 6 - Text
String Literals
What is utf-8
Escaping Characters
Multi-line String Literals
Raw String Literals
String Literals From Files
String Slice
Chars
String
Text As Function Parameters
Building Strings
Formatting Strings
Converting Strings
Chapter 6 - Conclusion
Chapter 7 - Object Oriented Programming
What Is OOP?
Rust Is Not OOP
Encapsulation With Methods
Abstraction With Selective Exposure
Polymorphism With Traits
Implemented Methods On Traits
Trait Inheritance
Dynamic vs Static Dispatch
Trait Objects
Handling Unsized Data
Generic Functions
Generic Function Shorthand
Box
Generic Structs Revisited
Chapter 7 - Conclusion
Chapter 8 - Smart Pointers
References Revisited
Raw Pointers
Dereferencing
The * Operator
The . Operator
Smart Pointers
Smart Unsafe Code
Familiar Friends
Heap Allocated Memory
Failable Main Revisited
Referencing Counting
Sharing Access
Sharing Across Threads
Combining Smart Pointers
Chapter 8 - Conclusion
Chapter 9 - Project Organization and Structure
Modules
Writing a Program
Writing a Library
Referencing Other Modules and Crates
Referencing Multiple Items
Creating Modules
Module Hierarchy
Inline Module
Internal Module Referencing
Exporting
Structure Visibility
Prelude
Your Own Prelude
Chapter 9 - Conclusion
Chapter 10 - The End