serde icon indicating copy to clipboard operation
serde copied to clipboard

container attributes 'field_identifier' and 'variant_identifier' are not documented

Open Lireer opened this issue 6 years ago • 4 comments

The attribute field_identifier is shown in a comment in the example Manually deserialize struct, but I can't find any documentation explaining what it does.

The same applies to variant_identifier which I found while looking through the code.

Lireer avatar May 01 '18 14:05 Lireer

Container attributes transparent, from and into are also undocumented

https://github.com/serde-rs/serde/blob/06dcbbbaba71ec15dc89162b5bc7177e4405ac9e/serde_derive/src/internals/attr.rs#L233-L236 https://github.com/serde-rs/serde/blob/06dcbbbaba71ec15dc89162b5bc7177e4405ac9e/serde_derive/src/internals/attr.rs#L332-L344

Mingun avatar Jun 23 '18 20:06 Mingun

@dtolnay I could find the documentation for transparent, from and into as container attributes, but the field_identifier and variant_identifier are still missing. Would you please shed some light on their usage?

I just came across this and noticed that field_identifier and variant_identifier are still not documented and, while I found GitHub issues referring to them, the context in those issues wasn't enough to make it clear what these attributes do or how they are supposed to be used (the examples given show only an isolated enum and not what the impact of the field on the enum is or how it fits into an actual use case). Documentation for these fields would be appreciated. If I understood what they do and why I would happily submit a PR... :wink:

ximon18 avatar Jun 23 '21 19:06 ximon18

Ping. Still not documented :/

hellow554 avatar May 05 '22 07:05 hellow554