pub enum Frame {
Record(Box<RunRecord>),
Unreadable {
bytes: usize,
},
}Expand description
One frame off the wire: a record this build understands, or a complete payload it does not.
The distinction is the whole point of the length prefix. A frame whose content is unreadable - a record kind added by a later build - is a well-formed frame whose bytes can be stepped over, and everything after it is still readable. A frame that is torn cannot be stepped over, because its length is unknown or its payload ran out, and the file ends there.
Conflating the two is what made adding a record kind a breaking change:
read_archive_lenient stopped at the first unknown record and returned the
prefix, silently dropping every readable record after it.
Variants§
Record(Box<RunRecord>)
A record this build knows how to read.
Unreadable
A complete frame whose payload this build cannot parse, stepped over. Carries its size so a caller can report what it skipped.