Skip to content
0:00 / 0:00

#rust#traits#generics

Rust Linz, July 2021 - Rainer Stropek - Traits, not your grandparents' interfaces

Rust Programming Language

70K subscribers • 43 videos on Hallway • Conference channel

YouTube
  • One of the most-watched uploads on Rust, a conference or university channel Hallway lists. Nobody has recommended it in the communities yet, so it ranks below community picks.
  • Presented by Rainer Stropek

Intermediate. Assumes working knowledge.

37K views5 years ago

Programming languagesSoftware designRustDesign patternsObject-oriented design

Rainer Stropek demonstrates the power of Rust traits, covering default implementations, trait parameters, trait objects, and generic bounds.

Developers who approach Rust from the viewpoint of other OO languages like TypeScript, C#, or Java frequently misinterpret Rust's traits as interfaces. That might be true to a certain extent, but on closer examination traits are much more powerful than you might think. In this demo-only session, Rainer Stropek starts by introducing you to the fundamentals of traits. You will see how to create your own ones, how to manually implement system traits, and how to auto-implement them. Once we covered those basics, Rainer dives deeper into unique features of traits. We will look at default implementations, trait parameters, trait objects, and trait bounds for generics. Rainer on Twitter: twitter.com/rstropek Rust Linz on Twitter: twitter.com/rustlinz

Why it's here

A top upload from a listed channel

Rust is on Hallway's list of conference and university channels, and this upload is one of its most-watched talks or lectures. Nobody has recommended it in the communities yet, so it ranks below community picks.