beerec-variants

Procedural derive macro to generate boilerplate on unit variants enum types.

rustboilerplateenumderiveproc-macroproc-macro-deriveunit-variant
FreeRepo

Preview

beerec-variants preview

Overview

beerec-variants is a Rust derive macro that generates utility methods for enum types with variants. It creates methods to convert variants to strings, iterate over variants and optionally implements Display, FromStr, Serialize and Deserialize traits. The macro supports customization through attributes like rename and rename_abbr to control string representations. Use cases include configuration enums, state machines and any type-safe enum that needs string conversion or serialization.

Features

procedural-derive-macroenum-boilerplate-generationstring-representationabbreviated-string-representationvariant-iterationdisplay-trait-generationfromstr-trait-generationserde-supportserialize-supportdeserialize-supportvariant-renamingvariant-skipping

Feature Flags

schedulingCrons

Recommended Use Cases

enum-variant-boilerplate-reductionrust-code-generationtype-safe-string-conversionsconfiguration-serialization

Frontend

None

Backend

rust

Auth Providers

None

Deployment Targets

None

Payment Providers

None

Quick Facts

โญ Stars
0
๐Ÿด Forks
0
๐Ÿ”„ Active
Yes
๐Ÿ•’ Last Commit
2025-09-26T11:26:00Z

Stack

Language
rust

Data Layer

UI Stack

Developer Experience

Docker
No
Tests
Yes
Quickstart
No
env.example
No

Pricing

Classification
free
Selected
โ€”
Notes
Open source Rust crate with no pricing model
Get Started with this Boilerplate