Skip to content

uimataso/enum-helper

Repository files navigation

enum-helper

CI Latest Version Rust Documentation Crates.io Crates.io

Yet another enum helper.

This crate provides derive macros that generate common boilerplate for enums.

[dependencies]
enum-helper = "0.2"

The derive feature is enabled by default, disable with default-features = false if you only need the traits.

Derive macros

  • EnumStr: convert between enum and string
  • EnumAll: get an array of all variants
  • EnumKind: generate a unit kind enum from a data-carrying enum

Feature flags

  • derive (default): re-exports derive macros
  • serde: provides serde helpers for use with EnumStr

Similar crates

License

Licensed under either of Apache License, Version 2.0 or MIT license at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in this crate by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

About

Yet another enum helper. Macros that generate common boilerplate for enums.

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Packages

 
 
 

Contributors