Enum isahc::error::ErrorKind [−][src]
A non-exhaustive list of error types that can occur while sending an HTTP request or receiving an HTTP response.
These are meant to be treated as general error codes that allow you to handle different sorts of errors in different ways, but are not always specific. The list is also non-exhaustive, and more variants may be added in the future.
Variants (Non-exhaustive)
A problem occurred with the local certificate.
The server certificate could not be validated.
The HTTP client failed to initialize.
Failed to connect to the server.
The server either returned a response using an unknown or unsupported encoding format, or the response encoding was malformed.
Provided authentication credentials were rejected by the server.
This error is only returned when using Isahc's built-in authentication methods. If using authentication headers manually, the server's response will be returned as a success unaltered.
The request to be sent was invalid and could not be sent.
Note that this is only returned for requests that the client deemed invalid. If the request appears to be valid but is rejected by the server, then the server's response will likely indicate as such.
An I/O error either sending the request or reading the response. This could be caused by a problem on the client machine, a problem on the server machine, or a problem with the network between the two.
Failed to resolve a host name.
This could be caused by any number of problems, including failure to reach a DNS server, misconfigured resolver configuration, or the hostname simply does not exist.
The server made an unrecoverable HTTP protocol violation. This indicates a bug in the server. Retrying a request that returns this error is likely to produce the same error.
Request processing could not continue because the client needed to re-send the request body, but was unable to rewind the body stream to the beginning in order to do so.
A request or operation took longer than the configured timeout time.
An error ocurred in the secure socket engine.
Number of redirects hit the maximum amount.
Trait Implementations
impl Clone for ErrorKind
[src]
impl Debug for ErrorKind
[src]
impl Display for ErrorKind
[src]
impl Eq for ErrorKind
[src]
impl From<ErrorKind> for Error
[src]
impl PartialEq<ErrorKind> for ErrorKind
[src]
fn eq(&self, other: &ErrorKind) -> bool
[src]
#[must_use]pub fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
impl PartialEq<ErrorKind> for &ErrorKind
[src]
fn eq(&self, other: &ErrorKind) -> bool
[src]
#[must_use]pub fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
impl PartialEq<ErrorKind> for Error
[src]
fn eq(&self, kind: &ErrorKind) -> bool
[src]
#[must_use]pub fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
impl StructuralEq for ErrorKind
[src]
impl StructuralPartialEq for ErrorKind
[src]
Auto Trait Implementations
impl RefUnwindSafe for ErrorKind
[src]
impl Send for ErrorKind
[src]
impl Sync for ErrorKind
[src]
impl Unpin for ErrorKind
[src]
impl UnwindSafe for ErrorKind
[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>,