Skip to content

bitflags!-generated public API has poor documentation UX #18227

Closed
@sfackler

Description

@sfackler

Say I'm at the documentation page for std::io::fs::mkdir and want to figure out how to call it: http://doc.rust-lang.org/std/io/fs/fn.mkdir.html. I want to figure out what the FilePermission type is, so I click on the link to its docs. I get sent here: http://doc.rust-lang.org/std/io/struct.FilePermission.html. Unfortunately, that page gives no indication at all of how actually initialize a FilePermission in a useful way. I have to somehow divine that I need to jump out to the documentation for the io module and scroll all the way to the bottom to the constants section: http://doc.rust-lang.org/std/io/index.html#constants to actually find some useful values to pass to mkdir.

Associated constants would help with this, as would sufficient compiler support to implement a robust EnumSet.

Metadata

Metadata

Assignees

No one assigned

    Labels

    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