enum_like
A trait to treat any type as an enum. If a type has a reasonably small number of variants, for example a `struct A(bool, bool)` which has 4 variants, this trait provides a 1-to-1 mapping from type value to a discriminant value. It also provides an iterator over all the possible values. This crate is mainly meant to be used along with [enum_like_derive](https://crates.io/crates/enum_like_derive) and [enum_vec](https://crates.io/crates/enum_vec) .
Ecosystem
crates.io
crates.io
Latest Release
over 7 years ago
0.2.1
over 7 years ago
Versions
3
3
Downloads
7,330 total
7,330 total
Dependent Packages
2
2
Dependent Repos
1
1
Loading...
Readme
Loading...
Links
| Registry | crates.io |
| Source | Repository |
| Docs | Documentation |
| JSON API | View JSON |
| CodeMeta | codemeta.json |
Package Details
| PURL |
pkg:cargo/enum_like
spec |
| License | GPL-3.0+ |
| First Release | almost 8 years ago |
| Last Synced | about 1 month ago |
Repository
| Stars | 5 on GitHub |
| Forks | 0 on GitHub |