Skip to content

Include methods in search results #601

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Kinrany opened this issue Feb 10, 2020 · 5 comments
Closed

Include methods in search results #601

Kinrany opened this issue Feb 10, 2020 · 5 comments

Comments

@Kinrany
Copy link

Kinrany commented Feb 10, 2020

I wanted to find the description of the StreamExt::flatten method from the futures crate.

Querying "flatten", the results were not very helpful. Fortunately there's the Flatten struct that references the method in its description.

The method is present in the "In Return Types" tab (and tabs are a bit unintuitive), so it seems showing the method is already possible. But the method shows up in those results only because it returns Flatten.

@Kinrany
Copy link
Author

Kinrany commented Feb 10, 2020

Oh, the method is there, it's the fourth result. I guess I can't read, sorry.

...consider this a request to move exact matches to the top of the list?

@jyn514
Copy link
Member

jyn514 commented Feb 10, 2020

This is a feature request for rustdoc, not docs.rs. Can you open an issue in https://github.com/rust-lang/rust instead?

Also, I would count Flatten as an exact match ... Maybe what you want is a way to show methods before structs or vice versa?

@GuillaumeGomez
Copy link
Member

GuillaumeGomez commented Feb 10, 2020

You can do so by filtering the items: fn:your-method

@Kinrany
Copy link
Author

Kinrany commented Feb 10, 2020

This is a feature request for rustdoc, not docs.rs. Can you open an issue in rust-lang/rust instead?

Sure, done! rust-lang/rust#69025

@Kinrany Kinrany closed this as completed Feb 10, 2020
@Kinrany
Copy link
Author

Kinrany commented Feb 10, 2020

Also, I would count Flatten as an exact match ... Maybe what you want is a way to show methods before structs or vice versa?

Not sure, but I don't think so. Intuitively it's simpler and makes more sense to look for symbols that have exactly the same name, including casing. It takes zero additional effort to type the name with the correct casing.

You can do so by filtering the items: fn:your-method

That's useful, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants