Derive forking for any enum
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 72
- Forks
- 16
- PR merge metrics
- No merged PRs in 30d
Description
Currently there is built-in support for forking Result and Option types, but users may want to fork custom enum types as well. We could provide a Fork procedural macro (or maybe ForkEnum) that would allow any enum to be forked.
The same macro could also provide an implementation for Unzippable for the enums that it's applied to, where the branches of the unzip are conditionally run based on which variant the enum contained. In this case we might consider renaming the Unzippable trait to Forkable.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the existing forking support for Result and Option and the Unzippable trait. Compare the Fork and ForkEnum alternatives, including whether Unzippable should be renamed to Forkable, then define the supported custom-enum behavior and confirm the resulting API is consistent.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100