Skip to main content

write_entries

Function write_entries 

Source
fn write_entries(
    store: &Store,
    path: &Path,
    changes: &[(&str, Option<&str>)],
    keep: impl FnOnce() -> Result<(), String>,
) -> Result<BTreeMap<String, String>, String>
Expand description

Writes entries into one file: each (entry, value), None taking it out; under the file’s lock, as the window writes some of these files too (the doses’ record: sioul_core::filelock). Before the file changes, or goes, keep keeps it as it was (history).