pub fn scan(
input: impl BufRead,
visit: impl FnMut(Row) -> Result<()>,
) -> Result<bool>Expand description
Stream the rows of a trace. Verifies schema, sequence continuity, a
single terminal TraceEnd and bounded size. Returns whether the file
ended complete (TraceEnd present with complete: true).
Schema 2 and 3 are both accepted (homogeneously per file). Schema-3 chunk carriers are reassembled before delivery: visitors see logical records only, an assembled record keeps its first chunk’s sequence, and every corruption of a chunk run is an explicit error. A run abandoned by the stream makes the trace incomplete — an error when the terminal marker claims otherwise — and its partial bytes are never delivered.