Skip to content

Allow converting to or from a u32? #21

@sunshowers

Description

@sunshowers

Seems like this crate would be most useful if it allowed converting either to or from a (say, serialized) u32.

#18 already exposes new_with_bits, but it seems like that doesn't do any checking for whether the enum even supports those bits. Might it be worth having checked and unchecked variants?

For converting into a u32, a simple impl From<EnumSet> for u32 should be sufficient.

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