pub struct OptionBuilder(/* private fields */);
Expand description
A builder of options objects.
Implementations§
Source§impl OptionBuilder
impl OptionBuilder
Sourcepub fn pathological_size(&mut self, size: usize) -> &mut Self
pub fn pathological_size(&mut self, size: usize) -> &mut Self
Set the minimum length for pathological ANSI escape sequences.
This method ensures that the given size is at least double the read buffer size, updating it if necessary.
Sourcepub fn read_buffer_size(&mut self, size: usize) -> &mut Self
pub fn read_buffer_size(&mut self, size: usize) -> &mut Self
Set the read buffer size.
This method also updates the pathological size to twice the given size.
The read buffer must be large enough to hold the entire escape sequence
being recognized. When querying colors, that is 27 bytes: A response for
the 16th ANSI color bright white starts with ‹OSC›4;15;rgb:
followed
by three four-digit hexadecimal numbers separated by forward slashes,
such as ffff/ffff/ffff
, and then the terminating ‹ST›
. Both OSC and
ST require at most two bytes, resulting in a maximum sequence length of
27 bytes.
This method ensures that the pathological size is at least double the given size, updating it if necessary.
Sourcepub fn write_buffer_size(&mut self, size: usize) -> &mut Self
pub fn write_buffer_size(&mut self, size: usize) -> &mut Self
Set the write buffer size.