pub struct Limits {
pub max_message_bytes: usize,
pub max_body_bytes: usize,
pub max_headers: usize,
pub max_header_bytes: usize,
pub max_folding_lines: usize,
}Expand description
Bounds on what the parser will accept.
Every limit is checked before the corresponding allocation. A declared Content-Length
above max_body_bytes is rejected without reserving that memory; otherwise a twelve-byte
header is a remote memory-exhaustion primitive.
Fields§
§max_message_bytes: usizeLargest message accepted, headers and body together.
max_body_bytes: usizeLargest body accepted.
max_headers: usizeMost header fields accepted.
max_header_bytes: usizeLargest single header field, folding included.
max_folding_lines: usizeMost continuation lines in one header field.
Implementations§
Trait Implementations§
impl Copy 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 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