file-seq

Crates.iofile-seq
lib.rsfile-seq
version0.2.0
sourcesrc
created_at2020-05-24 17:06:43.91377
updated_at2020-09-07 19:38:17.563765
descriptionFail-safe file sequence that uses the file system as store
homepage
repositoryhttps://github.com/jonhkr/rust-file-seq
max_upload_size
id245302
size10,795
Jonas Trevisan (jonhkr)

documentation

README

Fail-safe file sequence

Implemented in Rust. Inspired by this Java implementation

Crates.io GitHub Workflow Status

Usage

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();

Changelog

0.2.0 (2020-09-07)

  • Ignore errors on FileSeq::delete function #1
Commit count: 12

cargo fmt