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

Try to support enums #5

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft

Try to support enums #5

wants to merge 2 commits into from

Conversation

bugadani
Copy link

@bugadani bugadani commented Oct 31, 2023

  • Add a #[converter(path_to_const_func)] attribute to specify a converter function nah, nonsense. If we have to convert from an int, it's simpler to implement a const fn for the config struct.
  • Detect :: in default and check if it starts with the field's type. In case it's there, assume the value is an enum - this probably has problems if the default is a constant like usize::MAX. I'll need to handle non-string overridden values, too.

@bugadani bugadani changed the title Add two ways to work with enums Try to support enums Oct 31, 2023
@bugadani bugadani marked this pull request as draft October 31, 2023 21:49
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