1 unstable release
0.0.1 | Aug 5, 2024 |
---|
#95 in #rename
347 downloads per month
Used in 2 crates
(via starknet-devnet-server)
8KB
131 lines
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
Dependencies
~1.5MB
~37K SLoC