pub struct Limits {
pub bytes: usize,
pub allocation: usize,
pub nodes: usize,
pub depth: usize,
}Expand description
Consumer-selected allowances for Serde traversal.
Fields§
§bytes: usizeMaximum encoding bytes; framed APIs include the 11-byte header.
allocation: usizeConservative traversal allowance in bytes, not measured heap usage.
Reserves the entire Self::bytes allowance, then charges eight times
visited value sizes and text/byte lengths. Excludes caller input.
Encoding and decoding can require different allowances; see the crate guide.
nodes: usizeMaximum visited value nodes, including unit elements.
depth: usizeMaximum nesting depth.
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