Skip to content

Rustdoc: List impl interface before describing impl methods #15642

Closed
@gsingh93

Description

@gsingh93

Lots of languages have documentations where you can see the entire interface of the class before digging deeper and finding out what the methods do. For example, look at how the Java documentation is structured (C++ docs on multiple mainstream sites are similar): http://docs.oracle.com/javase/7/docs/api/java/util/ArrayList.html

There is a high level overview of the class, a list of methods with one line descriptions, followed by the same function list with more detailed descriptions. The list of methods links to the more detailed descriptions.

This structure allows a user who doesn't know the exact name of the method they're looking for quickly find the method. Contrast this with the current way rustdoc does things. Look at this page: http://doc.rust-lang.org/std/vec/struct.Vec.html

I have to sift through all the functions and their descriptions as I look for the function I want. The functions aren't alphabetized either, so if I am looking for a function, I can't find it alphabetically.

I don't know whether it would be good to show Traits methods in this list or not.

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-enhancementCategory: An issue proposing an enhancement or a PR with one.T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions