Skip to content

Document re-exports better #566

Open
@yoshuawuyts

Description

@yoshuawuyts

We use #[doc(inline)] for std and futures re-exports; this is nice because it creates a more cohesive feel for our library (which makes it easier to discover and learn). But it can sometimes be confusing for people what we re-export, and what not.

One way we could do this is by writing docs for all our re-exports, and what we've newly defined in each mod-level docs. This might be useful to create a distinction:

  • re-exports: what did we re-export from std or futures?
  • ports: what did we 1:1 port from std, and just make async?
  • new: what did we newly define that has no counterpart in std?

Additionally we could mark direct re-exports such as task::Context with a label in our documentation to show that they've been re-exported:

#[cfg_attr(feature = "docs", doc(cfg(re-export)))]

Though I'm unsure how good this is, as it would take the same place as "unstable" and could be confusing to people. But still, it's probably something worth considering.

Thanks!

Screenshots

Screenshot_2019-11-20 async_std task - Rust(1)

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions