pub trait IterableEnum: Sized {
// Required methods
fn iter_next(v: usize) -> Option<(usize, Self)>;
fn iter() -> EnumIterator<Self> ⓘ;
}Expand description
Allows EnumIterator to iterate over an enum type.
Required Methods§
Sourcefn iter_next(v: usize) -> Option<(usize, Self)>
fn iter_next(v: usize) -> Option<(usize, Self)>
Given an index into the iterator, return the value and the next index.
Iterators shall start by calling this with 0.
Sourcefn iter() -> EnumIterator<Self> ⓘ
fn iter() -> EnumIterator<Self> ⓘ
Instantiates an EnumIterator for an iterable type.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".