Decision Workspace
struct-to-enum vs variants-data-struct vs enum-struct
Side-by-side comparison of Rust crates
47
struct-to-enum
growingv1.1.2
Derive macros to generate enums from struct fields - compile-time safe field selection and dispatch
43
variants-data-struct
experimentalv0.3.0
A derive macro to convert enums into a struct where the variants are members and types are that that of variants data.
39
enum-struct
growingv0.1.1
Add shared fields to each variant of the enum
Core Metrics
| struct-to-enum | variants-data-struct | enum-struct | |
|---|---|---|---|
| Health Score | 47 | 43 | 39 |
| Total Downloads | 3.1K | 728 | 570 |
| 30d Downloads | 0 | 0 | 0 |
| Dependents | 0 | 0 | 0 |
| Releases | 5 | 3 | 2 |
| Last Updated | 205d ago | 351d ago | 384d ago |
| Age | 7m | 11m | 1y |
Health Breakdown
struct-to-enum
Maintenance
11
Quality
15
Community
5
Popularity
4
Documentation
12
variants-data-struct
Maintenance
9
Quality
13
Community
5
Popularity
3
Documentation
13
enum-struct
Maintenance
6
Quality
15
Community
5
Popularity
3
Documentation
10
Technical Details
| struct-to-enum | variants-data-struct | enum-struct | |
|---|---|---|---|
| Version | 1.1.2 | 0.3.0 | 0.1.1 |
| Stable (≥1.0) | ✓ Yes | ✗ No | ✗ No |
| License | MIT OR Apache-2.0 | MIT OR Apache-2.0 | MIT |
| Dependencies | 1 | 4 | 3 |
| Crate Size | 5KB | 11KB | 5KB |
| Features | 4 | 0 | 0 |
| Yanked % | 20.0% | 0.0% | 0.0% |
| Edition | 2021 | 2024 | 2024 |
| MSRV | 1.71.0 | — | — |
| Owners | 1 | 1 | 1 |
Links
Quick Verdict
- •struct-to-enum leads with a health score of 47/100, but none of the options score above 80.
- •⚠ enum-struct has not been updated in over a year.
- •variants-data-struct, enum-struct are pre-1.0 — API may change.