Skip to content

Feature Request: automatically implement marker trait to identify all variants of an enum #13

@enderprism

Description

@enderprism
#[derive(EnumVariantType)]
enum MyEnum {
    A,
    B,
    C,
}

would generate a marker trait like such:

trait MyEnumVariant: Into<MyEnum> + TryFrom<MyEnum> {}

and implement it on each variant's generated struct.
It could have additional supertraits according to #[evt(derive)] on the enum.

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