pub fn read_line(
reader: &mut impl BufRead,
maximum: u64,
) -> Result<Vec<u8>, FrameReadError>Expand description
Read one frame, retaining its newline and leaving later frames buffered.
maximum includes the newline. At most one excess byte is consumed to detect
overflow; this bounds retained bytes, not allocator capacity or elapsed time.
The caller owns parsing, deadlines, thread/process lifetime and diagnostics.
A refusal does not resynchronize the channel; callers must stop it or choose
their own recovery policy.
ยงErrors
Distinguishes clean EOF, missing newline, overflow and original I/O failures.