How can I force rustdoc documentation for one private function?
In my project, there are many private functions. I do not want them to be part of the generated rustdoc output (command cargo doc
). It's unnecessary for library users to read about these private functions.
However, there is one private function that should be part of the generated rustdoc output. Explaining this one private function will help library users understand the entire rust library. But still, I do not want users to call this function directly (hence private).
I know there is a command-line option --document-private-items
but I do not want documentation for the many other private functions.
Is there an attribute or command-line switch to force documentation generated for this one private function?
I was hoping for a contrary attribute to #[doc(hidden)]
, like #[doc(force)]
, or #[doc(show)]
, or #[not(doc(hidden))]
, etc.