This PR adds support for applying different attributes to each variant. I want this primarily to integrate with a new library I'm working on, metastruct, which could be used to generate field mapping macros for superstruct variant structs. Each macro needs a unique name, so we need to make a different metastruct call for each variant.
This PR adds support for applying different attributes to each variant. I want this primarily to integrate with a new library I'm working on,
metastruct
, which could be used to generate field mapping macros for superstruct variant structs. Each macro needs a unique name, so we need to make a differentmetastruct
call for each variant.There's an example of
metastruct
usage here: https://github.com/sigp/metastruct/blob/662cde78840c6cdfd6e688c155b87c6b4f1300d2/examples/hello_world.rs#L3-L6