pub struct Limits {
pub max_packet_bytes: usize,
pub max_sections: usize,
pub max_section_len: usize,
}Expand description
Wire-level limits for packet decoding.
These limits are enforced during decoding to prevent resource exhaustion attacks and ensure bounded memory usage. Section body parsing limits belong to higher layers (codec/schema).
Fields§
§max_packet_bytes: usizeMaximum packet size in bytes.
max_sections: usizeMaximum number of sections in a packet.
max_section_len: usizeMaximum length of a single section body in bytes.
Implementations§
Trait Implementations§
impl Eq for Limits
impl StructuralPartialEq for Limits
Auto Trait Implementations§
impl Freeze for Limits
impl RefUnwindSafe for Limits
impl Send for Limits
impl Sync for Limits
impl Unpin 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