I think my number one would-be-real-nice-to-have thing for rust is a doc on how to read and navigate the docs. A lot of the times: a) i feel like not a lot of methods have examples b) discovering methods is *hard*. You click through, you get lost, you click again, repeat ↻
-
-
That’s part of an idea we had to generate “cookbooks” based on your examples directory
-
@killercup are there docs/cookbook on how to write and read docs ? - 3 more replies
New conversation -
-
-
Oh yea! That'd be great!
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
Hmmm… assuming you don't have too many examples you can probably do #[doc="# Examples\n\n"] #[doc="```rust"] #[doc(include="examples/foo.rs")] #[doc="```"] for each?
-
This absolutely is an issue we should tackle, though, without hacks. The best approach I've personally come up with is in quicli: I generate the example source files from the docs that make up the website (but those are not part of the API docs)
End of conversation
New conversation -
-
-
Could you build an examples module file that has a placeholder method in it for each example, then commend above it the example in question?
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.