| Crates.io | file-seq |
| lib.rs | file-seq |
| version | 0.2.0 |
| created_at | 2020-05-24 17:06:43.91377+00 |
| updated_at | 2020-09-07 19:38:17.563765+00 |
| description | Fail-safe file sequence that uses the file system as store |
| homepage | |
| repository | https://github.com/jonhkr/rust-file-seq |
| max_upload_size | |
| id | 245302 |
| size | 10,795 |
Implemented in Rust. Inspired by this Java implementation
let initial_value = 1;
let seq = FileSeq::new(store_dir, initial_value).unwrap();
// Get current value
seq.value().unwrap();
// Increment by 1 and get
seq.increment_and_get(1).unwrap();
// Get, then increment by 1
seq.get_and_increment(1).unwrap();
FileSeq::delete function #1