Support declaring enum subcommands with named fields?
Open
- Dominant language
- Rust
- Stars
- 2k
- Forks
- 102
- PR merge metrics
- No merged PRs in 30d
Description
https://fuchsia-review.googlesource.com/c/fuchsia/+/559693/4/src/developer/forensics/crasher/rust/src/main.rs#41 is an example where the current way to define subcommands ends up being quite verbose. I suspect there might be obstacles to generating code without a named type to attach to each variant, but if it's possible to support enums with inline fields it would be a lot more ergonomic for small/simple use cases.
Contributor guide
Assessment
This issue has not been assessed yet.