#iterator #exhaust #exhaust-macros

macro exhaust-macros

Proc-macro support for the 'exhaust' library

6 releases

0.2.2 Mar 9, 2025
0.2.1 Sep 26, 2024
0.1.2 Sep 18, 2024
0.1.1 Apr 10, 2023
0.1.0 Feb 15, 2022

#1687 in Procedural macros

Download history 990/week @ 2024-12-13 469/week @ 2024-12-20 348/week @ 2024-12-27 679/week @ 2025-01-03 977/week @ 2025-01-10 1069/week @ 2025-01-17 993/week @ 2025-01-24 866/week @ 2025-01-31 906/week @ 2025-02-07 869/week @ 2025-02-14 1094/week @ 2025-02-21 1144/week @ 2025-02-28 1224/week @ 2025-03-07 1048/week @ 2025-03-14 1200/week @ 2025-03-21 979/week @ 2025-03-28

4,647 downloads per month
Used in 12 crates (via exhaust)

MIT/Apache

46KB
944 lines

Exhaust(ive iteration for Rust)

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.

License

Licensed under either of

at your option.

Contribution

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.

Dependencies

~0.7–1.1MB
~25K SLoC