Description
In this course, you will learn :
- Learn to work with variables and arrays of various data types
- Learn to use conditional statements
- Learn to code iterative programs using loops
- Learn to work with enums, structs and traits
- Learn how to use references
- Learn the fundamentals of the Rust programming language, including syntax, language philosophy, and Rust anatomy.
- With that in hand, you'll move on to some of Rust's more distinctive features, such as expression-oriented programming, ownership, and its strong type system.
Syllabus :
1. Hello World and variables
- Hello World
- What Does That Mean?
- Interpolation
- Variables
- More Math!
- Multiple Variables and Shadowing
- Types
2. Anatomy of Rust
- Introduction
- Pairing and Nesting
- Layout
- Comments
- Expressions, Values, and Types
- Variables, Again
- Effects Versus Results
- Blocks and Statements
3. Functions
- Hello World, Again
- Function Parameters
- Function Results
- Multiple Parameters
- Variable and Parameter Scope
- Anatomy of a Function
- Calling Functions
- Is main Special?
4. Booleans
- Equality
- Assertions
- Comparison Operators
- Functions Returning Booleans
- The Not Operator
- Not-ing Other Comparison Operators
- And/Or
5. Conditionals
- Hello If
- A Note on Semicolons
- Else
- Else If
- Evaluating to Values
- Factorial and Recursion
6. Mutable variables and while loops
- While Expressions/Loops
- Failed Attempt: Shadowing
- Almost Correct: Assignment
- More Than Once!
- Counting
- Sum
- Nested Loops
- Mutation and Shadowing
- Let Without Assignment
7. Structs and ownership
- All This Fruit!
- Struct
- Call Another Function
- Ownership and Moving
- Copy Values
- Make a Copy
- Move Out!
- Increasing Fruit
- Upper and Lower Case
8. References
- Borrow
- Mutable References
- What's In a Reference?
- Deref
- Lifetimes of References
- Mutating and Borrowing
- Multiple References
- Single Mutable Reference
- Mutable to Immutable
9. Methods
- Hello Method Calls!
- Type Inference
- Side Note: Underscores in Numbers
- Negative Numbers are Annoying
- Hello Method Implementations!
- Methods by Reference
- Static Methods
- The Self Type
- Method Call Chaining
10. Strings
- Bits, Bytes, and Memory
- Dynamically Sized Types
- Program Memory
- Lifetimes of String Literals
- Owned Strings
- The Type of Owned Strings
- Moving Strings
- Borrowing a String
- A Better Person
- The format! Macro
- Freeing
11. Arrays, Vecs, and slices
- Arrays
- Indexing
- Slices
- The Relation to String Slices
- Vec
- Slicing a Slice
12. Type parameters
- Parameterized Structs
- Parameterized Functions
- Parameterized impl Blocks
- Turbofish!
13. Traits
- Double Double
- Trait Bounds
- Parameterized Fruit
- Display
- Clone and Derive
- Copy and Marker Traits
- Debug
- Partial Equal, Partial Order
- Using Traits From std
- Multiple Bounds
- Associated Types
14. Enums
- Get Me a Job
- Using Variants
- Pattern Matching
- Commas and Braces
- More Teachers
- Methods for Enums
- Optional Results
- Capturing with Match
15. Iterators and for loops
- Count to 10
- Iterators
- Inclusive Range Expressions
- Iterating Over a Vec
- IntoIterator
- The Rule of 3
- Arrays and Slices
- Iterating on Strings
- Generic Iterator Functions
16. Early exit
- Time for a Break
- Replacing For With While
- Returning The Favor
- Salaries
- Let Me Ask You a Question
- Failing With Style
- Errors in main