Question about crates.io documentation

I maintain crate rstats

I notice that only comments in lib.rs (header file where trait and functions prototypes go) get included in docs.rs.

I have more detailed comments introduced by /// before every function implementation in the implementation source files but they do not seem to be generated by cargo doc and accessible in docs.rs. Is there any way of forcing this to happen? I do not like the idea of writing lots of doc comments for nothing.

I haven't checked every method, but I see documentation for a number of items on docs.rs/rstats.

Yes, those are only the briefest outline comments from lib.rs. Where have the comments from the implementation gone?

I'm not positive if this is what you're referring to, but the implementation of traits is collapsed by default. Click the [+] to the left of the trait name.

1 Like

Ah, so that is the trick, brilliant! :grinning:

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.