exhaust 0.2.6

Trait and derive macro for working with all possible values of a type (exhaustive enumeration).
Documentation
1
2
3
4
5
6
7
8
9
10
use core::cmp::Ordering;

use crate::patterns::{impl_newtype_generic, impl_via_array};

impl_newtype_generic!(T: [], core::cmp::Reverse<T>, core::cmp::Reverse);

impl_via_array!(
    Ordering,
    [Ordering::Less, Ordering::Equal, Ordering::Greater]
);