pub struct ParserOptions {
pub max_string_bytes: usize,
pub max_parameters: usize,
pub max_intermediates: usize,
}Expand description
Limits controlling memory retained while parsing untrusted input.
Fields§
§max_string_bytes: usizeMaximum number of bytes retained for one OSC/DCS/APC/PM/SOS payload.
Zero means that payload bytes are discarded while the parser still waits for the string terminator.
max_parameters: usizeMaximum number of semicolon-delimited CSI parameters.
A parameter is also limited to 64 bytes of raw digits/subparameters, so a sequence cannot evade this bound by sending one enormous value. Zero means that non-empty parameter data is discarded.
max_intermediates: usizeMaximum number of ESC/CSI intermediate bytes retained.
Zero means that intermediate bytes cause the sequence to be marked truncated.
Trait Implementations§
Source§impl Clone for ParserOptions
impl Clone for ParserOptions
impl Copy for ParserOptions
Source§impl Debug for ParserOptions
impl Debug for ParserOptions
Source§impl Default for ParserOptions
impl Default for ParserOptions
impl Eq for ParserOptions
Source§impl PartialEq for ParserOptions
impl PartialEq for ParserOptions
impl StructuralPartialEq for ParserOptions
Auto Trait Implementations§
impl Freeze for ParserOptions
impl RefUnwindSafe for ParserOptions
impl Send for ParserOptions
impl Sync for ParserOptions
impl Unpin for ParserOptions
impl UnsafeUnpin for ParserOptions
impl UnwindSafe for ParserOptions
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more