#int #enum #derive #macro #integer #derive-macro #proc-macro

int-enum

A derive macro for conversion between integer and enum types

6 releases (breaking)

Uses new Rust 2021

0.5.0 Oct 6, 2022
0.4.0 Feb 23, 2020
0.3.0 Dec 20, 2019
0.2.0 Dec 18, 2019
0.1.0 Oct 21, 2019

#186 in Rust patterns

Download history 570/week @ 2022-08-15 534/week @ 2022-08-22 722/week @ 2022-08-29 653/week @ 2022-09-05 799/week @ 2022-09-12 881/week @ 2022-09-19 722/week @ 2022-09-26 990/week @ 2022-10-03 879/week @ 2022-10-10 1493/week @ 2022-10-17 656/week @ 2022-10-24 628/week @ 2022-10-31 839/week @ 2022-11-07 816/week @ 2022-11-14 566/week @ 2022-11-21 428/week @ 2022-11-28

2,775 downloads per month
Used in 21 crates (12 directly)

MIT/Apache

11KB
130 lines

int-enum

crates.io docs.rs build status

This crate provides a derive macro to generate code for conversion between integer and enum types.

[dependencies]
int-enum = "0.5"

Compiler support: requires rustc 1.60+

License

This project is licensed under either of Apache License, Version 2.0 or MIT License at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Dependencies

~0.6–1.2MB
~26K SLoC