English | MP4 | AVC 1280×720 | AAC 44KHz 2ch | 342 lectures (37h 51m) | 12.65 GB
Master the Rust programming language from A-Z. Includes projects, quizzes, and more. Beginners welcome!
Learn to Code with Rust is a comprehensive introduction to programming in Rust, one of the fastest growing programming languages in the world. Rust powers codebases in companies and products like Amazon, Microsoft, Firefox, Discord, and more. It is used in a variety of disciplines including web development, CLI programs, build tools, and databases.
Topics covered include…
- Setup & Installation
- Variables
- Data types
- Functions and Methods
- Control Flow
- Ownership and References
- Slices
- Structs
- Enums
- Generics
- Option and Result Enums
- Vectors
- Project Structure
- Strings
- Hash Haps
- Error Handling
- Traits
- Lifetimes
Throughout the entire journey, I’ll be coding alongside you step by step in the code editor. You’ll also have the opportunity to test your knowledge through numerous coding challenges, quizzes, and written assignments.
Truth be told, Rust is known to be a challenging language to learn. For many concepts, I had to browse through different books, articles, and videos to understand what was going on. My hope here is to demystify the concepts and make it easier for new students to learn the language.
What you’ll learn
- Master programming in Rust, a fast, safe, and powerful language that is used in web development, command-line tools, blockchain, and many other domains
- Conquer Rust’s ownership model, use references to reduce memory, and learn how the compiler prevents common memory problems
- Progress from core language fundamentals to advanced features like traits, lifetimes, and closures
- Understand Rust’s core building blocks including structs, enums, hashmaps, and more
- Learn how to structure larger Rust projects using crates, modules, external dependencies, and more
- Explore a dynamic curriculum with videos, quizzes, written assignments, coding challenges and more
Table of Contents
Getting Started
1 Intro to Rust
2 The Rust Compiler
3 [macOS] Intro to Terminal
4 [macOS] Installing XCode Command Line Tools
5 [macOS] Installing Rust
6 [macOS] Installing Visual Studio Code
7 [macOS] Add VSCode to PATH
8 [Windows] Intro to PowerShell
9 [Windows] Find Out Your Windows Operating System
10 [Windows] Installing Visual Studio
11 [Windows] Installing Rust
12 [Windows] Installing Visual Studio Code
13 Updating or Uninstalling Rust with rustup
14 Install Git
15 Create Rust Project with Cargo
16 Hello World
17 Compiling and Running Rust File from the Terminal
18 Formatting with rustfmt and cargo fmt
19 The cargo build Command
20 The cargo run Command
21 The cargo check Command
22 Comments
23 Download Course Materials
24 Project Solution
25 Project
26 Section Review
Variables and Mutability
27 Open Variables and Mutability Project
28 Intro to Variables
29 Interpolation with Curly Braces
30 Positional Arguments to println!
31 Underscore with Variables
32 Immutable and Mutable Variables
33 Rust Error Codes Index
34 Variable Shadowing
35 Scopes
36 Constants
37 Type Aliases
38 Compiler Directives
39 Project Solution
40 Project
41 Section Review
Data Types
42 Open Data Types Project
43 Intro to Data Types
44 Integers
45 Using _ as Visual Separator for Numbers
46 The usize and isize Types
47 Strings and Raw Strings
48 Intro to Methods
49 Floating Point Types
50 Formatting Floats with Format Specifier
51 Casting Types with the as Keyword
52 Math Operations
53 Augmented Assignment Operator
54 Intro to Booleans
55 Boolean Inversion with !
56 Equality and Inequality Operators
57 And Logic with &&
58 Or Logic with
59 The Character Type
60 The Array Type
61 Reading and Writing Array Elements
62 The Display Trait
63 The Debug Trait
64 The dbg! Macro
65 The Tuple Type
66 Ranges and Range Iteration
67 Intro to Generics
68 Project Solution
69 Project
70 Section Review
Functions
71 Open Functions Project
72 Intro to Functions
73 Parameters and Arguments
74 Explicit Return Values
75 Implicit Return Values
76 The Unit as a Return Type
77 Blocks in Functions
78 Project Solution
79 Project
80 Section Review
Control Flow
81 Open Control Flow Project
82 The if Statement
83 The else if Statement
84 The else Statement
85 Assigning Result of if Statement to Variable
86 The match Statement
87 Underscore in a Match Arm
88 The match Statement with Multiple Values and Conditionals
89 The loop and break Keywords
90 The continue Keyword
91 While Loop
92 Recursion
93 Project Solution
94 Project
95 Section Review
Ownership
96 Open Ownership Project
97 Intro to Ownership
98 The Stack and Heap
99 Scope and Ownership
100 The Copy Trait
101 The String Type
102 The push_str Method on a String Type
103 Moves and Ownership
104 The drop Function
105 The clone Method
106 References and Borrowing
107 The Dereference Operator
108 String, &String, str, and &str
109 The Copy Trait with References
110 Ownership and Function Parameters
111 Mutable Parameters
112 Return Values I
113 Return Values II
114 Project Solution
115 Project
116 Section Review
References and Borrowing
117 Open Ownership Project
118 Immutable and Mutable Reference Parameters
119 Multiple Immutable References
120 Mutable Reference Restrictions
121 Ownership with Immutable and Mutable References
122 Dangling References
123 Ownership with Arrays and Tuples
124 Project Solution
125 Project
126 Section Review
Slices
127 Open Slices Project
128 Intro to Slices
129 Create a String Slice from a String
130 String Slices and String Literals
131 String Slice Lengths
132 Syntactic Shortcuts
133 String Slices as Function Parameters
134 Array Slices
135 Deref Coercion with Array Slices
136 Mutable Array Slices
137 Project Solution
138 Project
139 Section Review
Structs
140 Open Structs Project
141 Define a Struct
142 Create a Struct Instance
143 Access Struct Fields
144 Overwrite Struct Fields
145 Create Structs in a Function
146 Struct Field Initialization Shorthand Syntax
147 Struct Update Syntax
148 Passing Structs into a Function
149 Deriving Debug Trait for Struct
150 Defining Struct Methods
151 self Parameter as Mutable Struct Instance
152 self Parameter as Immutable and Mutable References to Struct Instance
153 Methods with Multiple Parameters
154 Calling Methods from Other Methods
155 Associated Functions
156 Multiple impl Blocks
157 Builder Pattern
158 Tuple Structs
159 Unit-Like Structs
160 Project Solution
161 Project
162 Section Review
Enums
163 Open Enums Project
164 Intro to Enums
165 Enum with Associated Values I
166 Enum with Associated Values II
167 A Brief Discussion on Enum Memory
168 Struct Variants
169 Nesting Enums in Enums
170 The match Keyword I
171 The match Keyword II
172 The match Keyword III
173 Defining Methods on Enums
174 The match Keyword IV – Catching Multiple Values
175 The match Keyword V – match with Exact Value
176 The if let Construct
177 Project Solution
178 Project
179 Section Review
Generics
180 Open Generics Project
181 Intro to Generics
182 The Turbofish Operator
183 Multiple Generics
184 Generics in Structs
185 Generics and impl Blocks I
186 Generics and impl Blocks II
187 Generics in Enums
188 Project Solution
189 Project
190 Section Review
Option and Result Enums
191 Open Option and Result Enums Project
192 The Option Enum
193 Real Example of Option Enum (The get Method on an Array)
194 The unwrap and expect Methods
195 The match Keyword with Option Enum
196 Returning an Option Enum from a Function
197 Top-Level Option Variants
198 The unwrap_or Method
199 Building Option from Scratch
200 The Result Enum
201 Real Example of Result Enum (The parse Method on a string)
202 Returning a Result Enum from a Function
203 Result Methods
204 Nuances of unwrap Method on Result
205 Project Solution
206 Project
207 Section Review
Vectors
208 Open Vectors Project
209 Create a Vector
210 Adding and Removing Elements
211 Reading Vector Elements
212 The get Method
213 Ownership with Vectors
214 Writing Vector Elements
215 Vector Capacity Behind the Scenes
216 Project Solution
217 Project
218 Section Review
Project Structure
219 Open Warehouse Project
220 Packages and Crates
221 Intro to Modules
222 The pub Keyword
223 The Benefit of Namespaces
224 Module as File
225 Module as Folder
226 Module Ambiguity
227 Public Enums, Public Structs, and Public Fields
228 Submodules
229 The crate Prefix
230 The use Keyword I
231 The use Keyword II (Name Conflicts)
232 The self Keyword
233 The super Keyword
234 Create Aliases with the as Keyword
235 Using pub use to Export Names from Submodules
236 External Crates
237 The Standard Library
238 The Glob Operator
239 Create Library Crate
240 Multiple Binary Crates
241 Documentation Comments
242 Bonus – Walking through Sample Module Structure
243 Project Solution
244 Project
245 Section Review
Strings
246 Open Strings Project
247 Review of Strings
248 Concatenation
249 The format! Macro
250 Common String Methods (trim, casing, replace, split)
251 Collecting User Input with read_line Method
252 Project Solution
253 Project
254 Section Review
HashMaps
255 Open Hash Maps Project
256 Create a HashMap with new Function
257 The remove Method
258 Hash Maps and Ownership
259 Access a Value by Key
260 Overwriting a Value with an Existing Key
261 The entry Method
262 Project Solution
263 Project
264 Section Review
Error Handling
265 Open Error Handling Project
266 The panic! Macro
267 The process Module and the exit Function
268 Standard Error (eprintln! Macro)
269 Opening a File
270 Asking the User for Input
271 Reading the File’s Contents
272 Propagating Errors
273 Understanding Error Type Redeclaration
274 The Operator
275 The read_to_string Associated Function
276 Using with Option
277 Project Solution
278 Project
279 Section Review
Traits
280 Open Traits Project
281 Intro to Traits
282 Defining a Trait
283 Implementing Trait for Struct I
284 Implementing Trait for Struct II
285 Default Implementations
286 Calling Trait Method from Another Method
287 Traits for Function Parameter Constraints
288 Trait Bound Syntax
289 Multiple Trait Bounds
290 where Clauses
291 Traits as Function Return Values
292 Trait Bounds to Conditionally Implement Methods
293 A Preview of Trait Objects
294 Trait Must be In Scope to Use its Definitions
295 Moving to Project Structure I
296 Moving to Project Structure II (Multiple Modules)
297 Associated Constants in a Trait
298 Getters in Traits
299 Setters in Traits
300 Supertraits I (Trait Inheritance)
301 Traits with Generics
302 Implementing the Display Trait on a Struct
303 Implementing the Display Trait on an Enum
304 Implementing the Debug Trait
305 Formatter Methods
306 Implementing the Drop Trait
307 Implementing the Clone Trait
308 Implementing the Copy Trait
309 Implementing the PartialEq Trait for Structs
310 Defining Equality for Different Types
311 Implementing the PartialEq Trait for Enums
312 Implementing the Eq Trait
313 Implementing the PartialOrd Trait
314 Associated Types I
315 Associated Types II
316 Project Solution
317 Project
318 Section Review
Lifetimes
319 Open Lifetimes Project
320 Concrete Lifetimes for Values I
321 Concrete Lifetimes for Values II
322 Concrete Lifetimes for References
323 Non-Lexical Lifetimes
324 Invalid Lifetimes I
325 Invalid Lifetimes II
326 Functions Cannot Return References to Owned Values or Parameters
327 References as Function Parameters
328 Intro to Generic Lifetimes
329 Lifetimes and Referents
330 Lifetime Elision Rules I
331 Multiple Parameters I
332 Multiple Parameters II
333 Lifetime Elision Rules II
334 Lifetimes in Structs
335 Multiple Lifetimes
336 The static Lifetime
337 Project Solution
338 Project
339 Section Review
Congratulations
340 Congratulations
341 Bonus!
342 Complete Slide Decks
Resolve the captcha to access the links!