pub enum BodyError {
TooLarge {
size: usize,
max: usize,
},
InvalidChunkedEncoding {
detail: &'static str,
},
Incomplete {
received: usize,
expected: Option<usize>,
},
UnexpectedEof,
Parse(ParseError),
}Expand description
Error types for body reading.
Variants§
TooLarge
Body exceeds maximum allowed size.
InvalidChunkedEncoding
Invalid chunked encoding.
Incomplete
Incomplete body (need more data).
Fields
UnexpectedEof
Unexpected end of input.
Parse(ParseError)
Parse error from underlying parser.
Trait Implementations§
Source§impl Error for BodyError
impl Error for BodyError
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<ParseError> for BodyError
impl From<ParseError> for BodyError
Source§fn from(e: ParseError) -> Self
fn from(e: ParseError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for BodyError
impl RefUnwindSafe for BodyError
impl Send for BodyError
impl Sync for BodyError
impl Unpin for BodyError
impl UnwindSafe for BodyError
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, _span: NoopSpan) -> Self
fn instrument(self, _span: NoopSpan) -> Self
Instruments this future with a span (no-op when disabled).
Source§fn in_current_span(self) -> Self
fn in_current_span(self) -> Self
Instruments this future with the current span (no-op when disabled).