Struct curl::Error

source ·
pub struct Error { /* private fields */ }
Expand description

An error returned from various “easy” operations.

This structure wraps a CURLcode.

Implementations§

Creates a new error from the underlying code returned by libcurl.

Stores some extra information about this error inside this error.

This is typically used with take_error_buf on the easy handles to couple the extra CURLOPT_ERRORBUFFER information with an Error being returned.

Returns whether this error corresponds to CURLE_UNSUPPORTED_PROTOCOL.

Returns whether this error corresponds to CURLE_FAILED_INIT.

Returns whether this error corresponds to CURLE_URL_MALFORMAT.

Returns whether this error corresponds to CURLE_COULDNT_RESOLVE_PROXY.

Returns whether this error corresponds to CURLE_COULDNT_RESOLVE_HOST.

Returns whether this error corresponds to CURLE_COULDNT_CONNECT.

Returns whether this error corresponds to CURLE_REMOTE_ACCESS_DENIED.

Returns whether this error corresponds to CURLE_PARTIAL_FILE.

Returns whether this error corresponds to CURLE_QUOTE_ERROR.

Returns whether this error corresponds to CURLE_HTTP_RETURNED_ERROR.

Returns whether this error corresponds to CURLE_READ_ERROR.

Returns whether this error corresponds to CURLE_WRITE_ERROR.

Returns whether this error corresponds to CURLE_UPLOAD_FAILED.

Returns whether this error corresponds to CURLE_OUT_OF_MEMORY.

Returns whether this error corresponds to CURLE_OPERATION_TIMEDOUT.

Returns whether this error corresponds to CURLE_RANGE_ERROR.

source

pub fn is_http_post_error(&self) -> bool

Returns whether this error corresponds to CURLE_HTTP_POST_ERROR.

Returns whether this error corresponds to CURLE_SSL_CONNECT_ERROR.

Returns whether this error corresponds to CURLE_BAD_DOWNLOAD_RESUME.

Returns whether this error corresponds to CURLE_FILE_COULDNT_READ_FILE.

Returns whether this error corresponds to CURLE_FUNCTION_NOT_FOUND.

Returns whether this error corresponds to CURLE_ABORTED_BY_CALLBACK.

Returns whether this error corresponds to CURLE_BAD_FUNCTION_ARGUMENT.

Returns whether this error corresponds to CURLE_INTERFACE_FAILED.

Returns whether this error corresponds to CURLE_TOO_MANY_REDIRECTS.

Returns whether this error corresponds to CURLE_UNKNOWN_OPTION.

Returns whether this error corresponds to CURLE_PEER_FAILED_VERIFICATION.

Returns whether this error corresponds to CURLE_GOT_NOTHING.

Returns whether this error corresponds to CURLE_SSL_ENGINE_NOTFOUND.

Returns whether this error corresponds to CURLE_SSL_ENGINE_SETFAILED.

Returns whether this error corresponds to CURLE_SEND_ERROR.

Returns whether this error corresponds to CURLE_RECV_ERROR.

Returns whether this error corresponds to CURLE_SSL_CERTPROBLEM.

Returns whether this error corresponds to CURLE_SSL_CIPHER.

Returns whether this error corresponds to CURLE_SSL_CACERT.

Returns whether this error corresponds to CURLE_BAD_CONTENT_ENCODING.

Returns whether this error corresponds to CURLE_FILESIZE_EXCEEDED.

Returns whether this error corresponds to CURLE_USE_SSL_FAILED.

Returns whether this error corresponds to CURLE_SEND_FAIL_REWIND.

Returns whether this error corresponds to CURLE_SSL_ENGINE_INITFAILED.

Returns whether this error corresponds to CURLE_LOGIN_DENIED.

Returns whether this error corresponds to CURLE_CONV_FAILED.

Returns whether this error corresponds to CURLE_CONV_REQD.

Returns whether this error corresponds to CURLE_SSL_CACERT_BADFILE.

Returns whether this error corresponds to CURLE_SSL_CRL_BADFILE.

Returns whether this error corresponds to CURLE_SSL_SHUTDOWN_FAILED.

Returns whether this error corresponds to CURLE_AGAIN.

Returns whether this error corresponds to CURLE_SSL_ISSUER_ERROR.

Returns whether this error corresponds to CURLE_CHUNK_FAILED.

Returns the value of the underlying error corresponding to libcurl.

Returns the extra description of this error, if any is available.

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Formats the value using the given formatter. Read more
👎Deprecated since 1.42.0: use the Display impl or to_string()
The lower-level source of this error, if any. Read more
👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type based access to context intended for error reports. Read more
Converts to this type from the input type.
Converts to this type from the input type.
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

🔬This is a nightly-only experimental API. (provide_any)
Data providers should implement this method to provide all values they are able to provide by using demand. Read more
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
Converts the given value to a String. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.