Enum attohttpc::ErrorKind

source ·
pub enum ErrorKind {
Show 17 variants ConnectNotSupported, ConnectError { status_code: StatusCode, body: Vec<u8>, }, Http(Error), Io(Error), InvalidBaseUrl, InvalidUrlHost, InvalidUrlPort, InvalidResponse(InvalidResponseKind), TooManyRedirections, StatusCode(StatusCode), Json(Error), UrlEncoded(Error), Tls(Error), InvalidDNSName(String), InvalidMimeType(String), TlsDisabled, WebPKI(Error),
}
Expand description

Common errors that can occur during HTTP requests.

Variants§

§

ConnectNotSupported

CONNECT is not supported.

§

ConnectError

Fields

§status_code: StatusCode

Status code from the proxy.

§body: Vec<u8>

Up to 10 KiB of body data from the proxy which might help diagnose the error.

Could not connect to proxy with CONNECT method.

§

Http(Error)

Error generated by the http crate.

§

Io(Error)

IO Error

§

InvalidBaseUrl

Invalid base URL given to the Request.

§

InvalidUrlHost

An URL with an invalid host was found while processing the request.

§

InvalidUrlPort

The URL scheme is unknown and the port is missing.

§

InvalidResponse(InvalidResponseKind)

Server sent an invalid response.

§

TooManyRedirections

Too many redirections

§

StatusCode(StatusCode)

Status code indicates failure

§

Json(Error)

JSON decoding/encoding error.

§

UrlEncoded(Error)

Form-URL encoding error.

§

Tls(Error)

TLS error encountered while connecting to an https server.

§

InvalidDNSName(String)

Invalid DNS name used for TLS certificate verification

§

InvalidMimeType(String)

Invalid mime type in a Multipart form

§

TlsDisabled

TLS was not enabled by features.

§

WebPKI(Error)

WebPKI error.

Trait Implementations§

source§

impl Debug for ErrorKind

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl From<ErrorKind> for Error

source§

fn from(err: ErrorKind) -> Error

Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere
    T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere
    T: ?Sized,

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere
    T: ?Sized,

const: unstable · source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere
    U: From<T>,

const: unstable · source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for Twhere
    U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere
    U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
const: unstable · source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for Twhere
    V: MultiLane<T>,

§

fn vzip(self) -> V