Rustdoc has for a while had an "important traits" feature wherein functions returning structs that implement notable traits (like
Write) have those traits mentioned in a popup.
This is what it currently looks like on hover (you can try it out here):
The basic idea behind this feature is that there are some traits which are typically the most important thing about a type implementing them. When you call
enumerate(), you don't really care about
Enumerate, you care about
impl Iterator, and you care what the
Iterator iterates over. This feature brings this information front and center, without needing to click through to the page for Enumerate.
- What do y'all think of this feature? Do you think it will be useful?
- What do you think of the label "important traits"? Is there something that could be used here that is more descriptive?
- What do you think of the UI/placement of this feature? Is it obvious enough?
- Do you think the choice of traits to mark "important" is good?