#[non_exhaustive]pub struct SizeLimitExceeded {
pub max_size: ByteUnit,
pub content_length: Option<usize>,
}
Expand description
The request body is larger than the maximum size limit enforced by this server.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.max_size: ByteUnit
The maximum size limit enforced by this server.
content_length: Option<usize>
The value of the Content-Length
header for the request that breached the body
size limit.
It’s set to None
if the Content-Length
header was missing or invalid.
If it’s set to Some(n)
and n
is smaller than max_n_bytes
, then the request
lied about the size of its body in the Content-Length
header.
Trait Implementations§
source§impl Debug for SizeLimitExceeded
impl Debug for SizeLimitExceeded
source§impl Display for SizeLimitExceeded
impl Display for SizeLimitExceeded
source§impl Error for SizeLimitExceeded
impl Error for SizeLimitExceeded
1.30.0 · source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
source§impl From<SizeLimitExceeded> for ExtractBufferedBodyError
impl From<SizeLimitExceeded> for ExtractBufferedBodyError
source§fn from(source: SizeLimitExceeded) -> Self
fn from(source: SizeLimitExceeded) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for SizeLimitExceeded
impl RefUnwindSafe for SizeLimitExceeded
impl Send for SizeLimitExceeded
impl Sync for SizeLimitExceeded
impl Unpin for SizeLimitExceeded
impl UnwindSafe for SizeLimitExceeded
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