enum-helper-macros

Crates.ioenum-helper-macros
lib.rsenum-helper-macros
version0.0.1
sourcesrc
created_at2024-08-05 06:19:02.332992
updated_at2024-08-05 06:19:02.332992
descriptionHelper macros for working with enums
homepage
repositoryhttps://github.com/marioiordanov/enum-helper-macros
max_upload_size
id1325567
size8,695
(marioiordanov)

documentation

README

Helper derive macros for enums

  • AllVariantsSerdeRenames: creates a method fn all_variants_serde_renames() -> Vec<String>, returning all variants serde rename attributes data.
  • VariantName: crates a method fn variant_name(&self) -> &str, returning the serde rename attribute data.

NOTE!

Both macros work only if there is #[serde(rename=...)] attribute applied to all of the enum variants

Commit count: 0

cargo fmt