Skip to main content

lines

Function lines 

Source
pub fn lines(
    body: BoxStream<'static, Result<Bytes, ExecError>>,
    max: usize,
) -> BoxStream<'static, Result<Bytes, ExecError>>
Expand description

bufio.Scanner with ScanLines and Buffer(nil, max): one item per line without its \n, a trailing \r dropped, the final unterminated line included, and bufio.ErrTooLong when no newline falls within max bytes of a line’s start (the scanner’s buffer never holds more). An I/O error ends the stream after the line buffered before it, as Scan returns that last token before reporting Err.