5 releases
0.1.5 | Aug 26, 2020 |
---|---|
0.1.4 | Aug 12, 2020 |
0.1.3 | Aug 10, 2020 |
0.1.2 | Aug 5, 2020 |
0.1.0 | Aug 5, 2020 |
#2118 in Data structures
30KB
868 lines
About
The name says it all - this crate is just a hodgepodge of potentially useful enums.
Examples
Usage is pretty simple. Import, and use to your heart's desire.
use hodgepodge::*;
fn main() {
println!("{:?}, {:?}, and {:?} are RGB colors", RGB::Blue, RGB::Red, RGB::Green);
}
This library uses strum
and strum_macros
, so you can do things like this:
use hodgepodge::*;
fn main() {
for member in Element::iter() {
println!("{:?} is element {:?}", member.clone(), member as i32);
}
}
And this:
use hodgepodge::*;
fn main() {
println!("There are {:?} elements", Element::iter().count());
}
Dependencies
~2MB
~43K SLoC