pub struct Limits {
pub max_nesting_depth: usize,
pub max_block_size: usize,
pub max_items: usize,
pub max_memory: usize,
pub max_string_length: usize,
}Expand description
Resource limits for decoder operations.
Fields§
§max_nesting_depth: usizeMaximum nesting depth for objects/arrays (default: 128).
max_block_size: usizeMaximum size of a single block in bytes (default: 64 MiB).
max_items: usizeMaximum number of items in a single array or object (default: 1M).
max_memory: usizeMaximum total memory allocation for a single decode session (default: 256 MiB).
max_string_length: usizeMaximum string length in bytes (default: 16 MiB).
Implementations§
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