-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Tutorial on how to read the standard library documentation on API docs homepage #40116
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Nominating to discuss at a future docs team meeting; I'd like to figure out a plan before sending in a PR here. |
I think it might be helpful to identify how people have encountered difficulties when reading the standard library documentation. I read the associated original issue but am unsure how to effectively resolve their issues. Would it be helpful to ping that user and ask how they stumbled when reading the docs? |
I'll try! Let's rewind the clock a few weeks for an example of how I tried to use the Rust documentation. I didn't know much about Rust (still don't! pardon any poor language choices here). I wanted to find information about the function
From this experience, I can identify a couple specific spots where things weren't quite ideal:
|
Don't worry about it; that makes this more helpful, not less! |
Some elements I remember people being surprised at is how the types used when rustdoc renders function signatures, struct layouts, etc, are actually hyperlinks to the type itself, and how they have hover text to show the full path. (This comes in handy when disambiguating |
removing the nominated tag; p-medium means we'll get to it, and we can figure out the plan then. |
Claiming this one. I'd like to get this sorted somehow during this release cycle. That may involve folding it into "The Rustdoc Book" (#42322) but I'd like to get better "this is the layout of rustdoc output" docs somewhere. |
Update: I started writing a "Rustdoc Field Guide" that would spell out some tips and tricks, but i got halfway through before moving on to other projects. I wrote it as a set of crate docs, with the intent of letting the user try out all the features as they read about them. This does pose a question about integrating into other "books", though, since API docs are difficult to fully integrate into mdbook-generated guides like The Rustboc Book. Regardless, i wanted to bring up the partial work i'd done here. |
Triage: we are still not sure what this would even look like, so removing |
@steveklabnik I personally think the docs are already quite intuitive as they are. I never had problems understanding the content displayed or where to find certain content. Since the module level documentation is often quite good I think that just a handful of people are not able to find what they are looking for, but of course, that is just a guess (can't look into others people's heads). I just saw that the std main page contains two sections "How to read this documentation?" and "What is in the Standard Library documentation?" which already does quite a good job in my opinion! The only things that are currently not documented (for as far as I know) is what "Trait Implementations", "Auto Trait Implementations" and "Blanket Implementations" are. But I wonder if it wouldn't be a bit too overkill to document what those are on the main page of I believe it's best to close this issue and focus on making |
Yep, I think I agree. If anyone has a concrete plan, please open a new issue with one! |
Moved here from rust-lang/book#477, cc @redactedscribe, who said:
I think a tutorial that walks through using the docs to solve the problem is a great idea that would be better suited for the std lib's homepage at https://doc.rust-lang.org/stable/std/index.html. There's a small section on "how to read this documentation", but it could be improved with a concrete example :)
cc @steveklabnik
The text was updated successfully, but these errors were encountered: