I'm making a library in Rust and I've started writing documentation for it. I notice that on e.g. https://doc.rust-lang.org/std/primitive.u128.html, the values of constants such as u128::BITS
are hidden, and only pub const BITS: u32
is displayed. However, when I run cargo doc
on my computer for my library, the documentation page shows the values of all associated constants for a struct that I have defined.
There are other similar constants which use several lines of code to compute and so look quite ugly like this one. How can I change this so that the value of each constant is hidden?