pub enum RequestValidationError {
MethodNotAllowed,
InvalidContentLength,
BodyTooLarge,
UnsupportedTransferEncoding,
ConflictingBodyHeaders,
InvalidRequestTarget,
}Expand description
Errors from request validation.
Variants§
MethodNotAllowed
Method not supported for static serving.
InvalidContentLength
Malformed Content-Length header (non-numeric, empty, negative, or
overflowing u64).
BodyTooLarge
Content-Length exceeds the configured body size limit.
UnsupportedTransferEncoding
Non-empty Transfer-Encoding on a read-only request.
ConflictingBodyHeaders
Both Content-Length and Transfer-Encoding present.
InvalidRequestTarget
Request target is not valid origin-form (must start with /).
Trait Implementations§
Source§impl Clone for RequestValidationError
impl Clone for RequestValidationError
Source§fn clone(&self) -> RequestValidationError
fn clone(&self) -> RequestValidationError
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for RequestValidationError
impl Debug for RequestValidationError
Source§impl Display for RequestValidationError
impl Display for RequestValidationError
impl Eq for RequestValidationError
Source§impl Error for RequestValidationError
impl Error for RequestValidationError
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 PartialEq for RequestValidationError
impl PartialEq for RequestValidationError
impl StructuralPartialEq for RequestValidationError
Auto Trait Implementations§
impl Freeze for RequestValidationError
impl RefUnwindSafe for RequestValidationError
impl Send for RequestValidationError
impl Sync for RequestValidationError
impl Unpin for RequestValidationError
impl UnsafeUnpin for RequestValidationError
impl UnwindSafe for RequestValidationError
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