Crate enum_cycling
source ·Expand description
§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"
Traits§
- This trait is the central piece to move up and down an
Enum
. By using#[derive(EnumCycle]
you can save yourself the hassle of having to write the implementation.
Derive Macros§
- 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]
.