[−][src]Struct isahc::error::Error
An error encountered while sending an HTTP request or receiving an HTTP response.
This type is intentionally opaque, as sending an HTTP request involves many
different moving parts, some of which can be platform or device-dependent.
It is recommended that you use the kind
method to get a
more generalized classification of error types that this error could be if
you need to handle different sorts of errors in different ways.
If you need to get more specific details about the reason for the error, you
can use the source
method. We do not provide
any stability guarantees about what error sources are returned.
Implementations
impl Error
[src]
pub fn kind(&self) -> &ErrorKind
[src]
Get the kind of error this represents.
The kind returned may not be matchable against any known documented if the reason for the error is unknown. Unknown errors may be an indication of a bug, or an error condition that we do not recognize appropriately. Either way, please report such occurrences to us!
pub fn is_client(&self) -> bool
[src]
Returns true if this error was likely caused by the client.
Usually indicates that the client was misconfigured or used to send invalid data to the server. Requests that return these sorts of errors probably should not be retried without first fixing the request parameters.
pub fn is_network(&self) -> bool
[src]
Returns true if this is an error likely related to network failures.
pub fn is_server(&self) -> bool
[src]
Returns true if this error was likely the fault of the server.
pub fn is_tls(&self) -> bool
[src]
Returns true if this error is related to SSL/TLS.
Trait Implementations
impl Clone for Error
[src]
impl Debug for Error
[src]
impl Display for Error
[src]
impl Error for Error
[src]
pub fn source(&self) -> Option<&(dyn StdError + 'static)>
[src]
pub fn backtrace(&self) -> Option<&Backtrace>
[src]
pub fn description(&self) -> &str
1.0.0[src]
pub fn cause(&self) -> Option<&dyn Error>
1.0.0[src]
impl From<Error> for Error
[src]
impl From<Error> for Error
[src]
impl From<Error> for Error
[src]
impl From<ErrorKind> for Error
[src]
impl PartialEq<ErrorKind> for Error
[src]
Auto Trait Implementations
impl !RefUnwindSafe for Error
[src]
impl Send for Error
[src]
impl Sync for Error
[src]
impl Unpin for Error
[src]
impl !UnwindSafe for Error
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> WithSubscriber for T
[src]
pub fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
[src]
S: Into<Dispatch>,