Skip to content

Conversation

@michaelsproul
Copy link
Member

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.

There's an example of metastruct usage here: https://github.com/sigp/metastruct/blob/662cde78840c6cdfd6e688c155b87c6b4f1300d2/examples/hello_world.rs#L3-L6

@michaelsproul michaelsproul merged commit efac781 into main Dec 6, 2022
@michaelsproul michaelsproul deleted the specific_variant_attributes branch December 6, 2022 00:25
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.

1 participant