#[derive(All)]
{
// Attributes available to this derive:
#[all_doc]
}
Expand description
Adds an function all to enum, returning an array with all variants of the enum
use fieldless_enum_tools::All;
#[derive(All, Debug, PartialEq, Eq)]
enum CoolEnum {
CoolVariantOne,
CoolVariantTwo
}
assert_eq!(
CoolEnum::all(),
[CoolEnum::CoolVariantOne, CoolEnum::CoolVariantTwo]
);§Attributes
§Outer attributes
#[all_doc = r#"..."#)]
Sets the doc of the function, with the default being “Returns an array of all elements on this enum.”