Skip to content

Custom derive #12

@Michael-F-Bryan

Description

@Michael-F-Bryan

Now that custom derives are stable, would this be better done using them instead of a macro_rules macro? That way you can have the FromPrimitive and ToPrimitive trait definitions in enum_primitive and then a enum_primitive_derive crate to do the deriving.

I think something like this is more applicable to macros 1.1 than macros by example, and that way you also fix up long-standing issues like being unable to document each variant.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions