Rust equivalent of Haskell's Hoogle

Hello!

Is there any equivalent of Haskell's https://hoogle.haskell.org/ ?

A search service for functions by their input and output types, answering questions like ”I have Option<Result<T,E>>, I need Result<Option<T>,E>” and it gives ”sure, use .transpose()”.

3 Likes

In the standard library docs (or any rustdoc generated docs), you can enter Option<Result> and click on the "In Parameters" or "In Return Types" tab to get relevant results. This is not as precise a search as Hoogle but it's right there already and sufficient to give you a short list of candidates.

I think I heard of someone having built a Hoogle-like for Rust, but I don't recall the name.

5 Likes

Unsurprisingly, it's called roogle (also check its github and cargo-roogle).

14 Likes

I feel... stupid now :slight_smile:

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.