{"action":"created","issue":{"url":"https://api.github.com/repos/rust-lang/rust/issues/19956","labels_url":"https://api.github.com/repos/rust-lang/rust/issues/19956/labels{/name}","comments_url":"https://api.github.com/repos/rust-lang/rust/issues/19956/comments","events_url":"https://api.github.com/repos/rust-lang/rust/issues/19956/events","html_url":"https://github.com/rust-lang/rust/issues/19956","id":52279520,"number":19956,"title":"std docs: methods are really difficult to discover","user":{"login":"mdinger","id":4156987,"avatar_url":"https://avatars.githubusercontent.com/u/4156987?v=3","gravatar_id":"","url":"https://api.github.com/users/mdinger","html_url":"https://github.com/mdinger","followers_url":"https://api.github.com/users/mdinger/followers","following_url":"https://api.github.com/users/mdinger/following{/other_user}","gists_url":"https://api.github.com/users/mdinger/gists{/gist_id}","starred_url":"https://api.github.com/users/mdinger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mdinger/subscriptions","organizations_url":"https://api.github.com/users/mdinger/orgs","repos_url":"https://api.github.com/users/mdinger/repos","events_url":"https://api.github.com/users/mdinger/events{/privacy}","received_events_url":"https://api.github.com/users/mdinger/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/rust-lang/rust/labels/A-rustdoc","name":"A-rustdoc","color":"d7e102"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":9,"created_at":"2014-12-17T19:18:51Z","updated_at":"2015-05-16T17:45:09Z","closed_at":null,"body":"From [reddit](http://www.reddit.com/r/rust/comments/2pfpeb/how_to_write_efficient_yet_safe_string/cmwanv1), `rev()` can be called on a `CharSplits` but there is no easy way to discover this without being told.\r\n```rust\r\nfor word in s.split(' ').rev() { ... }\r\n```\r\nHere's how I tried to manually find `rev()` after realizing it was there (copied from reddit):\r\n\r\n* Std docs -> str -> StrPrelude\r\n* click [CharSplits](http://doc.rust-lang.org/std/str/struct.CharSplits.html) in split\r\n* click Iterator...am back where I started\r\n* go back to CharSplits\r\n* click DoubleEndedIterator\r\n* Don't see it...\r\n* ah, search rev...it's in DoubleEndedIteratorExts\r\n* back to iterator\r\n* click trait DoubleEndedIteratorExts\r\n\r\nA solution would be to include the methods each trait provides on the page. Or to have the trait list it's provided methods directly.\r\n"},"comment":{"url":"https://api.github.com/repos/rust-lang/rust/issues/comments/102659201","html_url":"https://github.com/rust-lang/rust/issues/19956#issuecomment-102659201","issue_url":"https://api.github.com/repos/rust-lang/rust/issues/19956","id":102659201,"user":{"login":"tomjakubowski","id":667901,"avatar_url":"https://avatars.githubusercontent.com/u/667901?v=3","gravatar_id":"","url":"https://api.github.com/users/tomjakubowski","html_url":"https://github.com/tomjakubowski","followers_url":"https://api.github.com/users/tomjakubowski/followers","following_url":"https://api.github.com/users/tomjakubowski/following{/other_user}","gists_url":"https://api.github.com/users/tomjakubowski/gists{/gist_id}","starred_url":"https://api.github.com/users/tomjakubowski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tomjakubowski/subscriptions","organizations_url":"https://api.github.com/users/tomjakubowski/orgs","repos_url":"https://api.github.com/users/tomjakubowski/repos","events_url":"https://api.github.com/users/tomjakubowski/events{/privacy}","received_events_url":"https://api.github.com/users/tomjakubowski/received_events","type":"User","site_admin":false},"created_at":"2015-05-16T17:45:09Z","updated_at":"2015-05-16T17:45:09Z","body":"I disagree. When working on the compiler or rustdoc, for example, you often need to get an instance of some type out of a cache stored in the private field of a context struct somewhere, usually by calling a free function. Many of my efforts in rustdoc were stymied because while I knew I needed something of type Foo (or worse, a type parametrized by Foo), I didn't have an effective way to pare down the enormous search space of rustc's free functions by their return type (grepping the source was sometimes helpful, but the point of a documentation tool is to bring stuff like that at hand.) The same problem is there for iterator structs. \n\n\n\n—\nSent from Mailbox\n\nOn Sat, May 16, 2015 at 10:31 AM, Gulshan Singh <notifications@github.com>\nwrote:\n\n> The iterator problem is a bit different than the general problem, because with most other objects the methods to create them are defined the struct `impl` itself. With iterator structs, they're intended to be created by methods in other struct `impl`s, which is what makes them confusing.\n> ---\n> Reply to this email directly or view it on GitHub:\n> https://github.com/rust-lang/rust/issues/19956#issuecomment-102657608"}}