Skip to content

Add try_from for enum variants #403

@Sh3Rm4n

Description

@Sh3Rm4n

As From<enumVariant> for u8 is implemented in #374.

What do you think about implementing TryFrom<u8> for enumVariant?

It could look something like this, in the generated code.

https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=b703f510723d792edcd2776942cc02c7

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions