serde
serde copied to clipboard
container attributes 'field_identifier' and 'variant_identifier' are not documented
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.
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
@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:
Ping. Still not documented :/