Crates.io | exhaust |
lib.rs | exhaust |
version | 0.2.1 |
source | src |
created_at | 2022-02-15 03:41:14.213999 |
updated_at | 2024-09-26 20:10:54.322874 |
description | Trait and derive macro for working with all possible values of a type (exhaustive enumeration). |
homepage | |
repository | https://github.com/kpreid/exhaust/ |
max_upload_size | |
id | 532520 |
size | 87,206 |
exhaust
is a Rust library which provides the Exhaust
trait, which can be used to iterate over all possible values of a type that implements it. Implementations are provided for standard library types, and derive macros are available to allow easy implementation for user-defined types.
Exhaustive iteration may be useful for exhaustive testing, working with enums, and solving constraints by brute-force search.
exhaust
is no_std
compatible with default features disabled. The alloc
and std
features add implementations for the corresponding standard library crates.
Licensed under either of
at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.