Description
Currently, docs.rs search only matches exact type names. I'd like the search to include methods that return or accept a type even if that type is wrapped inside another type.
Example:
Suppose I have a struct called S, and a method defined as follows:
fn m(&self) -> E<S>
When I search for S, I expect to find this method listed in search results, even though the method returns E<S>
rather than directly returning S.
Similarly, if a method takes an argument like E<S>
:
fn another_method(arg: E<S>)
Then searching for S should also return another_method.
Deep/Nested Types:
This shouldn't be limited to just one level of wrapping. Ideally, the search should support multi-level nested types as well. For example:
fn complex_method() -> Arc<Mutex<S>>
This method should also show up when searching for S, despite S being deeply wrapped inside Arc and Mutex.
UI Suggestion:
If showing deeply nested matches by default is considered too noisy or expensive, it would be great to have a toggle or checkbox in the UI settings to enable "nested type search". That way, users who want deeper results can opt in when needed.
This enhancement would significantly improve the discoverability of methods and types, especially when generics and error handling wrappers are involved.