Skip to content

Conversation

@ko1N
Copy link

@ko1N ko1N commented Oct 16, 2020

This pull request enables enum variants to also have doc comments and annotations much like fields.

@neysofu
Copy link
Collaborator

neysofu commented Jan 16, 2021

This looks good, but I'm not so sure about exposing Variant internals with pub. Any specific reason why you would like to do that?

@ko1N
Copy link
Author

ko1N commented Jan 17, 2021

I required this when generating Serde models from a Json specification. In particular I needed to generate the Serde rename annotations for Enum variants.

@charnz
Copy link

charnz commented Feb 9, 2021

I have a similar use-case (generating Serde models) and would be keen to see this merged. Looking at the Field struct it seems that pub is used for the members there so its not without precedent. Only thing I can think of is i tmight be good to have a test for this similar to single_struct_documented_field for Field?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants