Normally mycrate/src/lib.rs
has the toplevel documentation for the crate's public API. Here I like to put an introduction to what the crate does, an example, etc.
I build two documentation sites, the normal one for the public API, and one with cargo doc --document-private-items
for the internals. I like to point new contributors to the internals documentation (plus, it is SO NICE to get internals docs right there in your text editor thanks to rust-analyzer!).
Is it possible to have the internals documentation present different contents in the toplevel than what is shown for the public API? For the internals, I'd like the toplevel to have a description of the library's architecture, or pointers to interesting places in the code - info only of interest to people working on the crate's code.
That is, can I do something so that cargo doc
and cargo doc --document-private-items
make it as if src/lib.rs
had different //!
contents?