An example of Struct in Rust - Full Crash Rust Tutorial for Beginners

Опубликовано: 15 Октябрь 2024
на канале: Francesco Ciulla
28,425
67

Welcome to the Rust Full Crash Rust Tutorial for Beginners

To understand when we might want to use structs, let’s write a program that calculates the area of a rectangle. We’ll start by using single variables and then refactor the program until we’re using structs instead.

All the Rust Tutorial videos:
Installation and Hello World:    • Rust Installation, Hello World, Hello...  
Variables:    • Variables, Shadowing, Constants in Ru...  
Data Types:    • Data Types in Rust -  Full Crash Rust...  
Functions:    • Functions in Rust -  Full Crash Rust ...  
Basic Control flow:    • Control flow in Rust: If, Match, loop...  
Ownership:    • Ownership in Rust -  Full Crash Rust ...  
References and Borrowing:    • References and Borrowing in Rust -  F...  
Slices:    • Slice in Rust -  Full Crash Rust Tuto...  
Structs:    • Structs in Rust -  Full Crash Rust Tu...  
Struct Example:    • An example of Struct in Rust -  Full ...  

ALL THE LINKS HERE: https://francescociulla.com

0:00 Intro. Example without structs
2:34 Refactoring with Tuples
4:14 Refactoring with Structs
6:06 Debugging features
7:52 Conclusion