Skip to content

std docs: methods are really difficult to discover #19956

Closed
@mdinger

Description

@mdinger

From reddit, rev() can be called on a CharSplits but there is no easy way to discover this without being told.

for word in s.split(' ').rev() { ... }

Here's how I tried to manually find rev() after realizing it was there (copied from reddit):

  • Std docs -> str -> StrPrelude
  • click CharSplits in split
  • click Iterator...am back where I started
  • go back to CharSplits
  • click DoubleEndedIterator
  • Don't see it...
  • ah, search rev...it's in DoubleEndedIteratorExts
  • back to iterator
  • click trait DoubleEndedIteratorExts

A solution would be to include the methods each trait provides on the page. Or to have the trait list it's provided methods directly.

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