| Crates.io | sequential |
| lib.rs | sequential |
| version | 0.5.1 |
| created_at | 2024-12-24 09:09:13.925246+00 |
| updated_at | 2025-01-27 15:29:07.074325+00 |
| description | A configurable sequential number generator. |
| homepage | |
| repository | https://github.com/emabee/sequential |
| max_upload_size | |
| id | 1493754 |
| size | 32,164 |
sequential is a tiny library that provides with Sequence a sequential number generator that
Serialize and Deserialize so that its state can be persistedu8 to u128, and with usize.checked_* arithmetics to avoid panic caused by number overflow.Add sequential to the dependencies section in your project's Cargo.toml
[dependencies]
sequential = "0.5"
let mut sequence = Sequence::<usize>::new();
assert_eq!(sequence.next(), Some(0_u8));
assert_eq!(sequence.next(), Some(1_u8));
serde (optional)Adds the serialization and deserialization capability.
The library has no external dependency except the optional one to serde.