Derive Macro enum_cycling::EnumCycle
source ยท #[derive(EnumCycle)]
{
// Attributes available to this derive:
#[skip]
#[cycle]
}
Expand description
auto-derives EnumCycle
for the enum. Each variant
of the enum will move to the one above / below itself.
Variants of the enum can be skipped using #[skip]
.
When a variant moves to one that can contain a value, the default value for that type will be used for the values of the returned enum variant.
Calling up / down on a variant that was skipped will result in a panic.