Does private methods doesn't get documented?

Hi all,

I am a struct with its method new being private. It was not documented in the repo. Why is it so?
Can some one explain? As new method has to be documented for the users.

If the new method isn't pub, then users can't call it, which is why it's also not documented.

But if you really want: cargo doc --document-private-items

3 Likes

Thank you. --document-private-items is good.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.