Skip to content

Derives for enums #8

@Kixunil

Description

@Kixunil

It'd be nice if this crate supported enums too. Suggested API:

`#[derive(DecodeME)]`
#[endian_codec(tag_repr = "u16", endian = "le")] // tag will be treated as u16 and matched against the enum variants
enum Message {
    #[endian_codec(tag = 42)]
    Foo(FooStruct),
    #[endian_codec(tag = 47)]
    Bar(BarStruct),
}

I may write the PR if I need it, but don't expect it any time soon (probably not this year).

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