New Rustacean

e009: Composing a Rustic tune

New Rustacean

Notes

Last time, we looked at generics and traits at a high level. This time, we dig deeper on traits, looking specifically at std::iter::Iterator as an example of a powerful trait that can be composed across types, and then at how we might compose multiple traits on a single type.

We also talk about the syntax for traits, the use of marker traits, some of the things you can’t presently do with traits, and even just a smidge about the future of traits in Rust. All that in less than 20 minutes!

You’ll find today’s source example fairly interesting, I think: it’s just one type, but it uses almost every concept discussed on the show today!

Sponsors

  • Aleksey Pirogov
  • Chris Palmer
  • Derek Morr
  • Hamza Sheikh
  • Luca Schmid
  • Micael Bergeron
  • Ralph Giles (“rillian”)
  • reddraggone9
  • William Roe

Become a sponsor

Follow

Next Episodes

New Rustacean

e008: Just like something else @ New Rustacean

📆 2015-12-27 17:19 / 00:17:37


New Rustacean

e007: Testify @ New Rustacean

📆 2015-12-13 18:38 / 00:18:46


New Rustacean

Bonus 2: Legacy Code @ New Rustacean

📆 2015-12-06 19:23 / 00:09:41


New Rustacean

Bonus 1: Polyglot Programming Promises and Perils @ New Rustacean

📆 2015-11-25 17:27 / 00:08:28


New Rustacean

e006: Modularize this! @ New Rustacean

📆 2015-11-16 16:36 / 00:18:22