Skip to content

Derive forking for any enum #144

@mxgrey

Description

@mxgrey

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions