The Fastest Way to Become a Backend Developer Online
PowerBI Data Analyst - Create visualizations and dashboards from scratch
Overview
AI, Data Science & Cloud Certificates from Google, IBM & Meta — 40% Off
One plan covers every Professional Certificate on Coursera. 40% off Coursera Plus Annual.
Unlock All Certificates
Explore Rust's powerful type system and traits in this 44-minute conference talk from PDXRust. Dive into basic types, inference, and manual type declaration before examining built-in types, including numeric types. Learn about methods for types, constructors, and implementing traits. Discover how to create and use custom traits while understanding trait coherence rules. Gain insights into useful types from the standard library such as Option, Result, and HashMap. Master essential traits like From/Into, FromStr, Debug, and Display. By the end, grasp how to implement custom traits and leverage Rust's derive functionality for debugging.
Syllabus
Intro
Rust's type system is worth knowing
Basic types - Inference
Basic types - Manual
Built-in Types An Incomplete list
Numeric types
A toy
Methods for types
Constructors
Implementing traits
It works!
Implementing custom traits (cont.)
Using custom traits
Trait coherence rules (cont.)
Useful types from the stdlib
Option
Result
HashMap
Useful traits from the stdlib
From / Into (cont.)
FromStr
Implementing Debug and Display
Implementing Display
Deriving Debug
Taught by
Rust