Expand description

Overview

Tools to iterate over the values of a type.

See the IntoEnumIterator trait.

Example

use enum_iterator::IntoEnumIterator;

#[derive(Debug, IntoEnumIterator, PartialEq)]
enum Day { Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday }

assert_eq!(Day::into_enum_iter().next(), Some(Day::Monday));
assert_eq!(Day::into_enum_iter().last(), Some(Day::Sunday));

Contribute

All contributions shall be licensed under the 0BSD license.

Traits

Trait to iterate over the values of a type.

Derive Macros

Derives IntoEnumIterator.