Decision Workspace
struct-to-enum vs variants-data-struct vs enum-struct
Side-by-side comparison of Rust crates
45
struct-to-enum
experimentalv1.1.2
Derive macros to generate enums from struct fields - compile-time safe field selection and dispatch
46
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.
41
enum-struct
experimentalv0.1.1
Add shared fields to each variant of the enum
Core Metrics
| struct-to-enum | variants-data-struct | enum-struct | |
|---|---|---|---|
| Health Score | 45 | 46 | 41 |
| Total Downloads | 65 | 622 | 551 |
| 30d Downloads | 65 | 20 | 4 |
| Dependents | 0 | 0 | 0 |
| Releases | 5 | 3 | 2 |
| Last Updated | 9d ago | 155d ago | 187d ago |
| Age | 24d | 5m | 6m |
Health Breakdown
struct-to-enum
Maintenance
13
Quality
13
Community
5
Popularity
2
Documentation
12
variants-data-struct
Maintenance
12
Quality
13
Community
5
Popularity
3
Documentation
13
enum-struct
Maintenance
9
Quality
14
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
- •variants-data-struct leads with a health score of 46/100, but none of the options score above 80.
- •variants-data-struct, enum-struct are pre-1.0 — API may change.