exhaust 0.1.2

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
11
12
13
use core::hash;
use core::iter;

use crate::Exhaust;

impl<H> Exhaust for hash::BuildHasherDefault<H> {
    type Iter = iter::Once<hash::BuildHasherDefault<H>>;

    fn exhaust() -> Self::Iter {
        // `BuildHasherDefault` is a ZST; it has exactly one value.
        iter::once(hash::BuildHasherDefault::default())
    }
}