Skip to content

Commit 04fce96

Browse files
committed
Update READMEs
1 parent ff2d103 commit 04fce96

File tree

3 files changed

+44
-6
lines changed

3 files changed

+44
-6
lines changed

README.md

Lines changed: 0 additions & 6 deletions
This file was deleted.

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
enum-iterator/README.md

enum-iterator-derive/README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<!-- cargo-sync-readme start -->
2+
3+
# Overview
4+
- [📦 crates.io](https://crates.io/crates/enum-iterator-derive)
5+
- [📖 Documentation](https://docs.rs/enum-iterator-derive)
6+
- [⚖ 0BSD license](https://spdx.org/licenses/0BSD.html)
7+
8+
Procedural macro to derive `IntoEnumIterator` for field-less enums.
9+
10+
See crate [enum-iterator](https://docs.rs/enum-iterator) for details.
11+
12+
# Contribute
13+
All contributions shall be licensed under the [0BSD license](https://spdx.org/licenses/0BSD.html).
14+
15+
<!-- cargo-sync-readme end -->

enum-iterator/README.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
<!-- cargo-sync-readme start -->
2+
3+
# Overview
4+
- [📦 crates.io](https://crates.io/crates/enum-iterator)
5+
- [📖 Documentation](https://docs.rs/enum-iterator)
6+
- [⚖ 0BSD license](https://spdx.org/licenses/0BSD.html)
7+
8+
Tools to iterate over the variants of a field-less enum.
9+
10+
See the `IntoEnumIterator` trait.
11+
12+
# Example
13+
```rust
14+
use enum_iterator::IntoEnumIterator;
15+
16+
#[derive(Debug, IntoEnumIterator, PartialEq)]
17+
enum Day { Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday }
18+
19+
fn main() {
20+
assert_eq!(Day::into_enum_iter().next(), Some(Day::Monday));
21+
assert_eq!(Day::into_enum_iter().last(), Some(Day::Sunday));
22+
}
23+
```
24+
25+
# Contribute
26+
All contributions shall be licensed under the [0BSD license](https://spdx.org/licenses/0BSD.html).
27+
28+
<!-- cargo-sync-readme end -->

0 commit comments

Comments
 (0)