Crate enum_unitary [] [src]

EnumUnitary trait and enum_unitary! macro.

Repository

The following num_traits traits 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

IterVariants
NextVariant
PrevVariant
enum_unitary

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

macro_attr

When given an item definition, including its attributes, this macro parses said attributes and dispatches any attributes or derivations suffixed with ! to user-defined macros. This allows multiple macros to process the same item.

Traits

EnumUnitary

A collection of constraints and methods for unitary enums.