pub fn read_all(root: &Path) -> (Vec<Observation>, usize)Expand description
Every readable observation of the checkout, oldest first, and the number of lines that could not be read. A torn or foreign line is counted, never silently dropped: a reader that cannot tell “nothing recorded” from “the record is damaged” acts on the wrong one.
use majordomus_cli::served::read_all;
let dir = tempfile::tempdir().unwrap();
// a checkout that has observed nothing answers with no observations, not an error
assert_eq!(read_all(dir.path()), (Vec::new(), 0));