Decision Workspace
repr_cast vs repr-discriminant-derive vs enum_from_variant
Side-by-side comparison of Rust crates
41
repr_cast
experimentalv0.1.0
A procedural macro that enhances fieldless enums with proper conversions between enum variants and their integer representation types
48
repr-discriminant-derive
experimentalv2.0.0
Derive macro to generate a method to access the discriminant of an enum variant with a repr(T) at runtime
41
enum_from_variant
growingv0.1.1
A Rust macro to generate From<T> trait implementations for enum variants, simplifying error conversions and enum mapping.
Core Metrics
| repr_cast | repr-discriminant-derive | enum_from_variant | |
|---|---|---|---|
| Health Score | 41 | 48 | 41 |
| Total Downloads | 33 | 565 | 2.5K |
| 30d Downloads | 3 | 66 | 4 |
| Dependents | 0 | 6 | 0 |
| Releases | 1 | 10 | 2 |
| Last Updated | 122d ago | 133d ago | 647d ago |
| Age | 4m | 4m | 1y 9m |
Health Breakdown
repr_cast
Maintenance
7
Quality
13
Community
6
Popularity
2
Documentation
13
repr-discriminant-derive
Maintenance
14
Quality
11
Community
7
Popularity
3
Documentation
13
enum_from_variant
Maintenance
5
Quality
14
Community
5
Popularity
4
Documentation
13
Technical Details
| repr_cast | repr-discriminant-derive | enum_from_variant | |
|---|---|---|---|
| Version | 0.1.0 | 2.0.0 | 0.1.1 |
| Stable (≥1.0) | ✗ No | ✓ Yes | ✗ No |
| License | MIT OR Apache-2.0 | MIT | MIT |
| Dependencies | 4 | 3 | 4 |
| Crate Size | 24KB | 3KB | 3KB |
| Features | 0 | 0 | 0 |
| Yanked % | 0.0% | 60.0% | 0.0% |
| Edition | 2021 | 2024 | 2021 |
| MSRV | — | — | — |
| Owners | 1 | 1 | 1 |
Links
Quick Verdict
- •repr-discriminant-derive leads with a health score of 48/100, but none of the options score above 80.
- •enum_from_variant has the most downloads (2.5K), suggesting wider adoption.
- •⚠ enum_from_variant has not been updated in over a year.
- •repr_cast, enum_from_variant are pre-1.0 — API may change.