Crate enum_cycling[][src]

Enum Cycling

Enum Cycling is a crate that allows one to more easily navigate enums in Rust.

The full version of the README can be found on Github

How to include Enum Cycling

Import enum_cycling into your project by adding this line to your Cargo.toml.

[dependencies]
enum_cycling = "0.1.0"
enum_cycling_derive = "0.1.0"

# You can also just use the "derive" feature
# enum_cycling = { version = "0.1.0", features = ["derive"]}

Traits

IntoEnumCycle

This trait is the central piece to move up and down an Enum. It may auto generated for you using the #[derive(EnumCycle] feature.

Derive Macros

EnumCycle

auto-derives IntoEnumCycle 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].