Class Central is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

YouTube

Traits and Types in Rust - PDXRust May 2016

Rust via YouTube

Overview

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

Reviews

Start your review of Traits and Types in Rust - PDXRust May 2016

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.