Struct Error
struct Error { ... }
Represents errors that can occur handling HTTP streams.
Formatting
The Display implementation of this type will only print the details of
this level of error, even though it may have been caused by another error
and contain that error in its source. To print all the relevant
information, including the source chain, using something like
std::error::Report, or equivalent 3rd party types.
The contents of the formatted error message of this specific Error type
is unspecified. You must not depend on it. The wording and details may
change in any version, with the goal of improving error messages.
Source
A hyper::Error may be caused by another error. To aid in debugging,
those are exposed in Error::source() as erased types. While it is
possible to check the exact type of the sources, they can not be depended
on. They may come from private internal dependencies, and are subject to
change at any moment.
Implementations
impl Error
fn is_parse(self: &Self) -> boolReturns true if this was an HTTP parse error.
fn is_parse_too_large(self: &Self) -> boolReturns true if this was an HTTP parse error caused by a message that was too large.
fn is_parse_status(self: &Self) -> boolReturns true if this was an HTTP parse error caused by an invalid response status code or reason phrase.
fn is_user(self: &Self) -> boolReturns true if this error was caused by user code.
fn is_canceled(self: &Self) -> boolReturns true if this was about a
Requestthat was canceled.fn is_closed(self: &Self) -> boolReturns true if a sender's channel is closed.
fn is_incomplete_message(self: &Self) -> boolReturns true if the connection closed before a message could complete.
fn is_body_write_aborted(self: &Self) -> boolReturns true if the body write was aborted.
fn is_timeout(self: &Self) -> boolReturns true if the error was caused by a timeout.
impl Debug for Error
fn fmt(self: &Self, f: &mut Formatter<'_>) -> Result
impl Display for Error
fn fmt(self: &Self, f: &mut Formatter<'_>) -> Result
impl Error for Error
fn source(self: &Self) -> Option<&dyn StdError + 'static>
impl Freeze for Error
impl RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnsafeUnpin for Error
impl UnwindSafe for Error
impl<T> Any for Error
fn type_id(self: &Self) -> TypeId
impl<T> Borrow for Error
fn borrow(self: &Self) -> &T
impl<T> BorrowMut for Error
fn borrow_mut(self: &mut Self) -> &mut T
impl<T> From for Error
fn from(t: T) -> TReturns the argument unchanged.
impl<T> Instrument for Error
impl<T> ToString for Error
fn to_string(self: &Self) -> String
impl<T> WithSubscriber for Error
impl<T, U> Into for Error
fn into(self: Self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses to do.
impl<T, U> TryFrom for Error
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
impl<T, U> TryInto for Error
fn try_into(self: Self) -> Result<U, <U as TryFrom<T>>::Error>