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 whether this error corresponds to CURLE_HTTP2.

Returns whether this error corresponds to CURLE_HTTP2_STREAM.

Returns the value of the underlying error corresponding to libcurl.

Returns the general description of this error code, using curl’s builtin strerror-like functionality.

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

The lower-level source of this error, if any. Read more

🔬 This is a nightly-only experimental API. (backtrace)

Returns a stack backtrace, if available, of where this error occurred. Read more

👎 Deprecated since 1.42.0:

use the Display impl or to_string()

👎 Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

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 !=.

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.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

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.