Function enum_iterator::reverse_all

source ·
pub fn reverse_all<T: Sequence>() -> ReverseAll<T> 
Expand description

Returns an iterator over all values of type T in the reverse order of all.

§Example

use enum_iterator::{reverse_all, Sequence};

#[derive(Debug, PartialEq, Sequence)]
enum Color { Red, Green, Blue }

assert_eq!(
    reverse_all::<Color>().collect::<Vec<_>>(),
    [Color::Blue, Color::Green, Color::Red],
);