I'm writing my first binary crate with Rust and though I have documentation comments for all functions, none of the functions show up in the documentation after running cargo doc --no-deps
. The only entry I see in the docs is the name of my crate with a line that starts with //!
in my comments.
However, they do show up when I mark modules as public. So in my main.rs, instead of
mod tasks;
if I use
pub mod tasks;
Those modules show up along with their public functions.
I found that I also need to do that for my main
function after which it gets listed in the docs. I'm not sure if I should do that.
Am I doing it right?