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

enum name as prefix to enum value #155

Closed
dzmitry-lahoda opened this issue Apr 13, 2021 · 3 comments
Closed

enum name as prefix to enum value #155

dzmitry-lahoda opened this issue Apr 13, 2021 · 3 comments

Comments

@dzmitry-lahoda
Copy link

dzmitry-lahoda commented Apr 13, 2021

given

enum Foo {
   Bar,
}

I want to get

"FooBar"

so something like could work

#[strum_prefix]
enum Foo {
   Bar,
}
@jayvdb
Copy link

jayvdb commented Apr 16, 2021

This would be very helpful for replicating Python enums, which display as Foo.Bar for the above scenario.

@cayman-amzn
Copy link

Looks like #296 may solve your use case

@Peternator7
Copy link
Owner

This should be solved like @cayman-amzn suggested

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

4 participants