Trait IterableEnum

Source
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§

Source

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.

Source

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", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl IterableEnum for u16

Implementors§