-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
enhancementNew feature or requestNew feature or request
Description
An idea as for renaming fields on duplicates
#[either_field::make_template(
DerivedStruct:
[
field_name as new_field_name: i32
],
)]
This is useful in cases you have a field such as player_id that can also be the player data, being able to rename it to player as to clear up confusion.
Issue
This is currently not possible with the implementation using generics type DerivedStruct = OriginalStruct;.
While this could, arguably, be ditched, it would require rewriting the macro's internals from scratch and the behavior would break. Subtypes from structs derive the same implementations as the original types, while generating completely new structs wouldn't.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request