Crate same_enum

Source
Expand description

§Same Enum

same_enum generates From trait implementations for enums with the same unit variants.

§Get Started

Place a #[from(path::to::TargetEnum)] or #[to(path::to::TargetEnum)] attribute above the source enum definition to generate From trait implementations.

Attribute Macros§

from
Generates an implementation of the From trait to convert from a target enum to the annotated enum.
to
Generates an implementation of the From trait to convert from the annotated enum to a target enum.