The Rust programming language has a lot of great features but it's not always obvious how to write Rust code in an idiomatic way. So today we are starting a series all about idiomatic Rust! In this video I cover constructors in Rust.
📝Get your FREE Rust cheat sheet :
https://www.letsgetrusty.com/cheatsheet
Code: https://github.com/letsgetrusty/rust_blog
Chapters:
0:00 Intro
0:25 Rust has only one true constructor
2:40 The new constructor function
5:47 Default constructors
8:31 Deriving the Default trait
10:00 The derive-new crate
12:39 Outro
#rust #programming #idiomatic