Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

rustdoc does not show storage items in pallets #12206

Open
2 tasks done
gilescope opened this issue Sep 7, 2022 · 4 comments
Open
2 tasks done

rustdoc does not show storage items in pallets #12206

gilescope opened this issue Sep 7, 2022 · 4 comments

Comments

@gilescope
Copy link
Contributor

gilescope commented Sep 7, 2022

Is there an existing issue?

  • I have searched the existing issues

Experiencing problems? Have you tried our Stack Exchange first?

  • This is not a support question.

Description of bug

There's no docs around storage items in pallets. This seems to be as they're not public enough. Could we add --document-private-items when we automatically generate our rust docs. This helps js devs reading up on pallets who might not be so comfortable reading the rust source. Also it's then in the search index.

Steps to reproduce

At the moment nothing shows when searching for OwnershipAcceptance at https://paritytech.github.io/substrate/master/.

@gilescope
Copy link
Contributor Author

Could we emit an attribute in the storage macro to force rustdoc to document it even though it's private?

@gilescope
Copy link
Contributor Author

Not yet it seems: rust-lang/rust#66528

@kianenigma
Copy link
Contributor

There's no docs around storage items in pallets. This seems to be as they're not public enough.

Depends on the storage item? some are public, some are not. Here's one that is public and its docs does show up:

https://paritytech.github.io/substrate/master/pallet_nomination_pools/pallet/type.PoolMembers.html

@kianenigma
Copy link
Contributor

OwnershipAcceptance is pub(super), ergo it won't appear here.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants