pub fn parse_frame_header<'a>(
lines: &mut impl Iterator<Item = &'a str>,
) -> Result<FrameHeader, ParseError>
Expand description
Parses the 9-line header of a .con
file frame from an iterator.
This function consumes the next 9 lines from the given line iterator to
construct a FrameHeader
. The iterator is advanced by 9 lines on success.
§Arguments
lines
- A mutable reference to an iterator that yields string slices.
§Errors
ParseError::IncompleteHeader
if the iterator has fewer than 9 lines remaining.- Propagates any errors from
parse_line_of_n
if the numeric data within the header is malformed.
§Panics
This function will panic if the intermediate vectors for box dimensions or angles,
after being successfully parsed, cannot be converted into fixed-size arrays.
This should not happen if parse_line_of_n
is used correctly with n=3
.