Overview
Save Big on Coursera Plus. 7,000+ courses at $160 off. Limited Time Only!
Explore the power of Rust traits in this comprehensive conference talk by Rainer Stropek. Delve into the fundamentals of traits, learning how to create and implement them, both manually and automatically. Discover unique features such as default implementations, trait parameters, trait objects, and trait bounds for generics. Through practical demonstrations, understand how traits differ from interfaces in other OO languages like TypeScript, C#, or Java. Gain insights into advanced concepts including enums, typecasting, unit tests, FromStr and Into traits, iterators, lifetimes, and more. Follow along as Rainer builds a Prince of Persia-inspired example, showcasing real-world applications of traits in Rust programming.
Syllabus
Introduction
Overview
Prince of Persia
Getting started with traits
What happens behind the scenes
Board content
enums
typecasting
unit tests
from and into
I32 trait
String trait
Board index
Board index type
Convert board index to usize
Parsing
FromString
RSTest
Two Compact String
Iterator structure
Lifetimes
Rows Iterator
Iterator
IndexMutable
Square Assessor
Is Valid
Behind the Scenes
Taught by
Rust