//! This crate provides the [`Exhaust`] trait and derive macro, which allow iterating over
//! all values of a given type.
extern crate alloc;
extern crate std;
pub use Exhaust;
pub use *;
pub use *;
/// Types that can be exhaustively iterated. That is, an iterator is available which
/// produces every possible value of this type.
///
/// Implementors must also implement [`Clone`], because it is useful for the purpose of
/// implementing [`Exhaust`] on types containing this type. This should never be a
/// significant restriction since a type implementing [`Exhaust`] implies that every
/// instance can be derived from pure data (“the Nth element of `T::exhaust()`”).
///
/// # Examples
///
/// ```
/// use exhaust::Exhaust;
///
/// #[derive(Clone, PartialEq, Debug, Exhaust)]
/// struct Foo {
/// a: bool,
/// b: Bar,
/// }
///
/// #[derive(Clone, PartialEq, Debug, Exhaust)]
/// enum Bar {
/// One,
/// Two(bool),
/// }
///
/// assert_eq!(
/// Foo::exhaust().collect::<Vec<Foo>>(),
/// vec![
/// Foo { a: false, b: Bar::One },
/// Foo { a: false, b: Bar::Two(false) },
/// Foo { a: false, b: Bar::Two(true) },
/// Foo { a: true, b: Bar::One },
/// Foo { a: true, b: Bar::Two(false) },
/// Foo { a: true, b: Bar::Two(true) },
/// ],
/// );
/// ```