问题
I want to know a struct that implements std::io::Write
; is it described in some document?
回答1:
When you lookup the API for std you can search for your trait there (e.g. std::io::Write).
When you scroll down to the section "Implementors" you will see all structs/enums that implement that trait in std
.
To get a better overview, you can use the + or - keys to collapse all sections and have a nice overview, e.g.

来源:https://stackoverflow.com/questions/55216559/how-can-i-get-a-list-of-types-that-implement-a-particular-trait-in-rust