#enums #array #create #constant #containing #items #macro

enum_array

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

1 unstable release

0.1.0 Sep 24, 2022

#66 in #containing

MIT license

3KB

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])

No runtime deps