Skip to main content

decode_store_content

Function decode_store_content 

Source
pub fn decode_store_content<E>(
    path: &Path,
    content: &str,
    decode: impl FnOnce(&str) -> Result<Vec<Value>, E>,
    copy_path: Option<&Path>,
) -> Result<(Vec<ExecutionRecord>, DecodeSource), E>
Expand description

Decode content of the store at path into JSON records, or reuse an earlier decode of the same content: this process’s own, or the JSON copy at copy_path. Every call returns its own copy, so callers may change the records they get.