Enum chttp::error::Error [−][src]
pub enum Error {
BadClientCertificate(Option<String>),
BadServerCertificate(Option<String>),
ConnectFailed,
CouldntResolveHost,
CouldntResolveProxy,
Curl(String),
InvalidContentEncoding(Option<String>),
InvalidCredentials,
InvalidHttpFormat(Error),
InvalidJson,
InvalidUtf8,
Io(Error),
NoResponse,
RangeRequestUnsupported,
RequestBodyError(Option<String>),
ResponseBodyError(Option<String>),
SSLConnectFailed(Option<String>),
SSLEngineError(Option<String>),
Timeout,
TooManyConnections,
TooManyRedirects,
TransportBusy,
}All possible types of errors that can be returned from cHTTP.
Variants
BadClientCertificate(Option<String>)A problem occurred with the local certificate.
BadServerCertificate(Option<String>)The server certificate could not be validated.
ConnectFailedFailed to connect to the server.
CouldntResolveHostCouldn't resolve host name.
CouldntResolveProxyCouldn't resolve proxy host name.
Curl(String)An unrecognized error thrown by libcurl.
InvalidContentEncoding(Option<String>)Unrecognized or bad content encoding returned by the server.
InvalidCredentialsProvided credentials were rejected by the server.
InvalidHttpFormat(Error)Validation error when constructing the request or parsing the response.
InvalidJsonJSON syntax error when constructing or parsing JSON values.
InvalidUtf8Invalid UTF-8 string error.
Io(Error)An unknown I/O error.
NoResponseThe server did not send a response.
RangeRequestUnsupportedThe server does not support or accept range requests.
RequestBodyError(Option<String>)An error occurred while writing the request body.
ResponseBodyError(Option<String>)An error occurred while reading the response body.
SSLConnectFailed(Option<String>)Failed to connect over a secure socket.
SSLEngineError(Option<String>)An error ocurred in the secure socket engine.
TimeoutAn ongoing request took longer than the configured timeout time.
TooManyConnectionsReturned when making more simultaneous requests would exceed the configured TCP connection limit.
TooManyRedirectsNumber of redirects hit the maximum amount.
TransportBusyAn attempt was made to re-use a transport for a new request that already has another request in progress.
Trait Implementations
impl Debug for Error[src]
impl Debug for Errorfn fmt(&self, f: &mut Formatter) -> Result[src]
fn fmt(&self, f: &mut Formatter) -> ResultFormats the value using the given formatter. Read more
impl Display for Error[src]
impl Display for Errorfn fmt(&self, f: &mut Formatter) -> Result[src]
fn fmt(&self, f: &mut Formatter) -> ResultFormats the value using the given formatter. Read more
impl StdError for Error[src]
impl StdError for Errorfn description(&self) -> &str[src]
fn description(&self) -> &strThis method is soft-deprecated. Read more
fn cause(&self) -> Option<&StdError>[src]
fn cause(&self) -> Option<&StdError>The lower-level cause of this error, if any. Read more
impl From<Error> for Error[src]
impl From<Error> for Errorimpl From<MultiError> for Error[src]
impl From<MultiError> for Errorfn from(error: MultiError) -> Error[src]
fn from(error: MultiError) -> ErrorPerforms the conversion.
impl From<Error> for Error[src]
impl From<Error> for Errorimpl From<Error> for Error[src]
impl From<Error> for Errorimpl From<Error> for Error[src]
impl From<Error> for Errorimpl From<FromUtf8Error> for Error[src]
impl From<FromUtf8Error> for Errorfn from(_: FromUtf8Error) -> Error[src]
fn from(_: FromUtf8Error) -> ErrorPerforms the conversion.