enum_array

Crates.ioenum_array
lib.rsenum_array
version0.1.0
sourcesrc
created_at2022-09-24 23:45:18.738348
updated_at2022-09-24 23:45:18.738348
descriptionA small crate adding a macro that creates a constant array containing all the items of the enum
homepage
repository
max_upload_size
id673315
size2,481
(danielrab)

documentation

README

A small crate adding a macro that creates a constant array containing all the items of the enum. usage example:

enum_array!{
    #[derive(Debug, PartialEq, Eq)]
    pub enum Example {
        A,
        B,
    }
}
assert_eq!(Example::ENTRIES, [Example::A, Example::B])
Commit count: 0

cargo fmt