Crate enum_unitary

source ·
Expand description

EnumUnitary trait and enum_unitary! macro.

Repository

The following num_traits traits are re-exported in the local crate:

use enum_unitary::{Bounded, FromPrimitive, ToPrimitive};

The following macros are also re-exported because they are used in the enum_unitary! macro implementation and do not need to be used directly:

macro_attr::{macro_attr};
enum_derive::{enum_derive_util, IterVariants, NextVariant, PrevVariant};

Macros

Wraps “unitary” enums (i.e. enums where variants do not have payloads) with enum_derive derives (IterVariants, NextVariant, PrevVariant) and implements the EnumUnitary trait.

Traits

A collection of constraints and methods for unitary enums.