[][src]Struct isahc::error::Error

pub struct 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]

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

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> WithSubscriber for T[src]