https://github.com/kpreid/exhaust
Exhaustive iteration trait in Rust
https://github.com/kpreid/exhaust
iterator rust
Last synced: 11 months ago
JSON representation
Exhaustive iteration trait in Rust
- Host: GitHub
- URL: https://github.com/kpreid/exhaust
- Owner: kpreid
- License: apache-2.0
- Created: 2022-02-15T03:39:21.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2025-03-25T02:37:09.000Z (12 months ago)
- Last Synced: 2025-04-02T23:45:56.238Z (12 months ago)
- Topics: iterator, rust
- Language: Rust
- Homepage: https://docs.rs/exhaust/
- Size: 196 KB
- Stars: 14
- Watchers: 2
- Forks: 2
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE-APACHE
Awesome Lists containing this project
README
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
* Apache License, Version 2.0
([LICENSE-APACHE](LICENSE-APACHE) or http://www.apache.org/licenses/LICENSE-2.0)
* MIT license
([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT)
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.