pub struct Limits {
pub bytes: usize,
pub allocation: usize,
pub nodes: usize,
pub depth: usize,
}Expand description
Consumer-selected Serde traversal allowances.
Custom Serde code is trusted: work and allocation outside visited values cannot be constrained by these allowances. Allocation is conservative accounting, not a live-heap cap, and depends on target type layouts.
Fields§
§bytes: usizeMaximum encoded/input bytes, including the header when framed.
allocation: usizeReserve all configured bytes, then eight times visited value sizes and byte/text spans. Borrowed spans pay the same charge as owned spans.
nodes: usizeMaximum visits, including seed visits and zero-sized values.
depth: usizeMaximum visit depth, starting at one.
Trait Implementations§
Auto Trait Implementations§
impl Forget for Limits
impl Freeze for Limits
impl Move 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