Skip to content

Rust docs: Please add groupings of producers and consumers by type #37061

Open
@dagit

Description

@dagit

I find myself often navigating to rustdocs and then clicking through to the [src] link instead of using the docs directly (or bypassing rustdoc and going to the git repo). The most common reason I find myself doing this is because I'm trying to learn the interface for some type that I want to use.

Coming from an algebraic datatype background, I often want to know the set of ways to introduce a type and the different functions that accept that type (roughly speaking, producers and consumers of a type).

The rustdocs as they are today do a good job of listing the impl functions for a type and enumerating traits for the type. So what more do I want? Let's say there is a module foo that defines the type Foo. Often times foo, and other modules within the same library, also define functions that operate on Foo. I would like a convenient way to see these functions together. Perhaps we could call it a type indexed index :)

I apologize if this feature already exists and I've overlooked it.

Thanks in advance!

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