pub struct Limits {
pub max_body: usize,
pub max_header_bytes: usize,
pub timeout: Option<Duration>,
}Expand description
Server resource limits — the difference between “demo” and “won’t fall over”.
Fields§
§max_body: usizeReject request bodies larger than this (HTTP 413). Default 2 MiB.
max_header_bytes: usizeReject requests whose headers exceed this many bytes (HTTP 413).
timeout: Option<Duration>Per-socket read/write timeout (slowloris protection). Default 30s.
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