Skip to main content

read

Function read 

Source
pub fn read(path: &Path) -> Result<Vec<Bark>, BarkError>
Expand description

Reads every bark in path, oldest first, skipping any line that will not parse.

A line that will not parse is a partially-written record from a writer that died mid-append, or a record from a future shep. Neither is a reason to refuse the whole history during an incident, which is the one time this file is read.

§Errors

  • BarkError::Io — the file exists and could not be read. A missing file is Ok(Vec::new()): no barks yet is not a fault.