Skip to main content

stream_extract_lines

Function stream_extract_lines 

Source
pub(crate) fn stream_extract_lines(
    carry: &mut String,
    new_data: bool,
) -> Vec<String>
Expand description

Split the complete lines out of @carry, keeping a trailing partial for the next read. Stream elements are concatenated without separators and reads split lines arbitrarily, so prefixes may only be matched on complete lines. @new_data says whether this poll read anything: a partial with no continuation after a full poll interval is flushed as a line of its own.