Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Re-design deserialization macros to handle both structs and enums #27

Open
dasupradyumna opened this issue Jan 8, 2025 · 0 comments
Open
Assignees
Labels
internal Related to internal project development
Milestone

Comments

@dasupradyumna
Copy link
Owner

Context

setup_deserializable_struct!() macro creates and sets up all the serde structs and trait implementations required for Settings and its sub-structs to be deserialized from settings passed via lua setup() function. Other structs such as TaskDisplay, TaskDisplayFloatSize are also required to be deserialized since they are part of plugin settings structure.

The current design of the macro does not differentiate between structs and enums when it implements the relevant traits.

Proposal

Change the design of these macros to make them modular so that setup_deserializable_struct!() macro can call itself as well as the setup_deserializable_enum!() macro depending on the field types.

@dasupradyumna dasupradyumna self-assigned this Jan 8, 2025
@dasupradyumna dasupradyumna added the internal Related to internal project development label Jan 8, 2025
@dasupradyumna dasupradyumna modified the milestones: v1.0.0, v1.1.0 Jan 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
internal Related to internal project development
Projects
None yet
Development

No branches or pull requests

1 participant