What topics would you like to see covered in a video course about Rust?

I've been programming using Rust for a while now, but my use a Rust has been rather constrained to the problem space of the one crate that I'm working on (encoding_rs). I don't find the usual tropes of what's supposed to be hard about Rust hard: I don't find the distinction between String and &str hard (and I think it would be harmful to try to obfuscate the distinction for supposed benefit of beginners) and I don't find lifetimes conceptually hard. (Of course, like everyone else, I have had practical problems with expressing syntactically the lifetimes that I knew I wanted conceptually and I have spent time fighting the borrow checker structure code such that mutable double borrows don't occur. Still, anyone who has programmed with C or C++ has to understand lifetimes conceptually or they have been routinely writing security bugs unless saved by luck.)

What I've found hard includes:

  • How to navigate the docs in the presence of deref conversions and functionality being behind iterators and such: Figuring out what methods I can actually call on a given struct. Example case: I have a slice. What documentation reading routines should I have to figure out the standard library way of linearly searching the slice for a key in getting the index? I can see binary search on the slice itself but no linear search. The answer is that I need to take an iterator over the slice and call a method on the iterator: haystack.iter().position(|&x| x == needle)

  • While Rust doesn't have method overloading by parameter list, traits such as FromIterator lead to an outcome that gives the ergonomics of overloading by return type. Although I know that the FromIterator, From and Into traits exist, I have a hard time developing intuition about their use and intuition about defining similarly used traits myself. Seeing more examples of putting them into practice than (the current draft of) the Programming Rust O'Reilly book gives for these would be helpful.

  • The previous point of traits enabling the ergonomics of overloading by return type can be used to emulate the ergonomics of method overloading by parameter type. I don't know how one would teach it, but it would be useful to teach when to use that trick. (See how the nsstring crate in Gecko has an append method that has specialized behavior when the argument is another XPCOM string even though XPCOM strings deref into slice and the method accepts slices, too.)

  • Figuring out lifetime syntax when there's a group of interrelated structs that have lifetime interdependencies. (I knew conceptually what I wanted for handles.rs in encoding_rs but had to ask on IRC for the syntax.)