0:00 -:--
Speed
++++++
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! Links - Nick Cameron: “Thoughts on Rust in 2016” - “Upcoming breakage starting in Rust 1.7, from RFCs 1214 and 136” - RFC 1214: Clarify (and improve) rules for projections and well-formedness - RFC 136: Ban private items in public APIs - The Rust Book: - Traits - Trait objects (dynamic dispatch) - The Rust reference: - std::iter and std::iter::Iterator - Add - Drop -…