pub struct LineParsingOptions {
pub max_line_length: NumBytes,
pub overflow_behavior: LineOverflowBehavior,
}Expand description
Configuration options for parsing lines from a stream.
Fields§
§max_line_length: NumBytesMaximum length of a single line in bytes. When reached, further data won’t be appended to the current line. The line will be emitted in its current state.
A value of 0 means that “no limit” is imposed.
Only set this to 0 when you absolutely trust the input stream! Remember that an observed
stream maliciously writing endless amounts of data without ever writing a line break
would starve this system from ever emitting a line and will lead to an infinite amount of
memory being allocated to hold the line data, letting this process running out of memory!
Defaults to 16 kilobytes.
overflow_behavior: LineOverflowBehaviorWhat should happen when a line is too long?
When lossy buffering drops chunks before they reach the parser, line-based consumers conservatively discard any partial line and resynchronize at the next newline instead of joining bytes across the gap.
Trait Implementations§
Source§impl Clone for LineParsingOptions
impl Clone for LineParsingOptions
Source§fn clone(&self) -> LineParsingOptions
fn clone(&self) -> LineParsingOptions
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more