open-rmf / open-rmf/crossflow

Derive forking for any enum

Open
#144 1 comment 0 reactions 0 assignees View on GitHub

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.