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.
ConnectFailed
Failed to connect to the server.
CouldntResolveHost
Couldn't resolve host name.
CouldntResolveProxy
Couldn'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.
InvalidCredentials
Provided credentials were rejected by the server.
InvalidHttpFormat(Error)
Validation error when constructing the request or parsing the response.
InvalidJson
JSON syntax error when constructing or parsing JSON values.
InvalidUtf8
Invalid UTF-8 string error.
Io(Error)
An unknown I/O error.
NoResponse
The server did not send a response.
RangeRequestUnsupported
The 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.
Timeout
An ongoing request took longer than the configured timeout time.
TooManyConnections
Returned when making more simultaneous requests would exceed the configured TCP connection limit.
TooManyRedirects
Number of redirects hit the maximum amount.
TransportBusy
An 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 Error
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Display for Error
[src]
impl Display for Error
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl StdError for Error
[src]
impl StdError for Error
fn description(&self) -> &str
[src]
fn description(&self) -> &str
This 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 Error
impl From<MultiError> for Error
[src]
impl From<MultiError> for Error
fn from(error: MultiError) -> Error
[src]
fn from(error: MultiError) -> Error
Performs the conversion.
impl From<Error> for Error
[src]
impl From<Error> for Error
impl From<Error> for Error
[src]
impl From<Error> for Error
impl From<Error> for Error
[src]
impl From<Error> for Error
impl From<FromUtf8Error> for Error
[src]
impl From<FromUtf8Error> for Error
fn from(_: FromUtf8Error) -> Error
[src]
fn from(_: FromUtf8Error) -> Error
Performs the conversion.