pub struct Limits {
pub max_input_bytes: usize,
pub max_nodes: usize,
pub max_depth: usize,
}Expand description
Resource limits for constructing a document.
The input limit is checked before tokenization. Node and depth limits are checked before retaining the next node. These checks are not fallible allocation or process-wide memory accounting.
Fields§
§max_input_bytes: usizeMaximum number of input bytes (default: 128 MiB).
max_nodes: usizeMaximum total number of retained element and text nodes (default: 4 million).
max_depth: usizeMaximum number of simultaneously open non-void elements (default: 256).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Limits
impl RefUnwindSafe for Limits
impl Send for Limits
impl Sync for Limits
impl Unpin for Limits
impl UnsafeUnpin for Limits
impl UnwindSafe for Limits
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