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

AsRef<str> and default variants #316

Open
wyatt-herkamp opened this issue Nov 24, 2023 · 0 comments
Open

AsRef<str> and default variants #316

wyatt-herkamp opened this issue Nov 24, 2023 · 0 comments

Comments

@wyatt-herkamp
Copy link
Contributor

wyatt-herkamp commented Nov 24, 2023

Currently AsRefStr returns the variant names. Even when we have a default variant.

This is kind of weird. in some cases. It would be nice to have an option to return the default variant value.

I know this option would mean it would no longer return a static str. However, in some cases it would be more useful.

So I am suggesting either a new Macro like AsRefStrWithDefault or have an attribute parameter to use the default value.

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

No branches or pull requests

1 participant