hodgepodge

Crates.iohodgepodge
lib.rshodgepodge
version0.1.5
sourcesrc
created_at2020-08-05 20:58:11.105012
updated_at2020-08-26 03:08:57.789964
descriptionA hodgepodge of enums
homepagehttps://github.com/cmccomb/hodgepodge
repositoryhttps://github.com/cmccomb/hodgepodge
max_upload_size
id273415
size33,012
Chris McComb (cmccomb)

documentation

https://docs.rs/hodgepodge

README

Build Status Crates.io docs.rs

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());
}
Commit count: 17

cargo fmt