pub enum HttpError {
InvalidMethod(String),
InvalidContentType(String),
HeadersTooLarge {
size: usize,
max: usize,
},
BodyTooLarge {
size: usize,
max: usize,
},
UnsupportedTransferEncoding(String),
JsonError(Error),
CodecError(CodecError),
Timeout,
Closed,
Transport(TransportError),
}Expand description
HTTP transport error.
Variants§
InvalidMethod(String)
Invalid HTTP method.
InvalidContentType(String)
Invalid Content-Type.
HeadersTooLarge
HTTP headers exceeded the maximum allowed size.
BodyTooLarge
HTTP body exceeded the maximum allowed size.
UnsupportedTransferEncoding(String)
Unsupported Transfer-Encoding.
JsonError(Error)
JSON parsing error.
CodecError(CodecError)
Codec error.
Timeout
Request timeout.
Closed
Connection closed.
Transport(TransportError)
Transport error.
Trait Implementations§
Source§impl Error for HttpError
impl Error for HttpError
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<CodecError> for HttpError
impl From<CodecError> for HttpError
Source§fn from(err: CodecError) -> HttpError
fn from(err: CodecError) -> HttpError
Converts to this type from the input type.
Source§impl From<TransportError> for HttpError
impl From<TransportError> for HttpError
Source§fn from(err: TransportError) -> HttpError
fn from(err: TransportError) -> HttpError
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for HttpError
impl !RefUnwindSafe for HttpError
impl Send for HttpError
impl Sync for HttpError
impl Unpin for HttpError
impl !UnwindSafe for HttpError
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).