[][src]Struct curl::Error

pub struct Error { /* fields omitted */ }

An error returned from various "easy" operations.

This structure wraps a CURLcode.

Methods

impl Error[src]

pub fn new(code: CURLcode) -> Error[src]

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

pub fn set_extra(&mut self, extra: String)[src]

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.

pub fn is_unsupported_protocol(&self) -> bool[src]

Returns whether this error corresponds to CURLE_UNSUPPORTED_PROTOCOL.

pub fn is_failed_init(&self) -> bool[src]

Returns whether this error corresponds to CURLE_FAILED_INIT.

pub fn is_url_malformed(&self) -> bool[src]

Returns whether this error corresponds to CURLE_URL_MALFORMAT.

pub fn is_couldnt_resolve_proxy(&self) -> bool[src]

Returns whether this error corresponds to CURLE_COULDNT_RESOLVE_PROXY.

pub fn is_couldnt_resolve_host(&self) -> bool[src]

Returns whether this error corresponds to CURLE_COULDNT_RESOLVE_HOST.

pub fn is_couldnt_connect(&self) -> bool[src]

Returns whether this error corresponds to CURLE_COULDNT_CONNECT.

pub fn is_remote_access_denied(&self) -> bool[src]

Returns whether this error corresponds to CURLE_REMOTE_ACCESS_DENIED.

pub fn is_partial_file(&self) -> bool[src]

Returns whether this error corresponds to CURLE_PARTIAL_FILE.

pub fn is_quote_error(&self) -> bool[src]

Returns whether this error corresponds to CURLE_QUOTE_ERROR.

pub fn is_http_returned_error(&self) -> bool[src]

Returns whether this error corresponds to CURLE_HTTP_RETURNED_ERROR.

pub fn is_read_error(&self) -> bool[src]

Returns whether this error corresponds to CURLE_READ_ERROR.

pub fn is_write_error(&self) -> bool[src]

Returns whether this error corresponds to CURLE_WRITE_ERROR.

pub fn is_upload_failed(&self) -> bool[src]

Returns whether this error corresponds to CURLE_UPLOAD_FAILED.

pub fn is_out_of_memory(&self) -> bool[src]

Returns whether this error corresponds to CURLE_OUT_OF_MEMORY.

pub fn is_operation_timedout(&self) -> bool[src]

Returns whether this error corresponds to CURLE_OPERATION_TIMEDOUT.

pub fn is_range_error(&self) -> bool[src]

Returns whether this error corresponds to CURLE_RANGE_ERROR.

pub fn is_http_post_error(&self) -> bool[src]

Returns whether this error corresponds to CURLE_HTTP_POST_ERROR.

pub fn is_ssl_connect_error(&self) -> bool[src]

Returns whether this error corresponds to CURLE_SSL_CONNECT_ERROR.

pub fn is_bad_download_resume(&self) -> bool[src]

Returns whether this error corresponds to CURLE_BAD_DOWNLOAD_RESUME.

pub fn is_file_couldnt_read_file(&self) -> bool[src]

Returns whether this error corresponds to CURLE_FILE_COULDNT_READ_FILE.

pub fn is_function_not_found(&self) -> bool[src]

Returns whether this error corresponds to CURLE_FUNCTION_NOT_FOUND.

pub fn is_aborted_by_callback(&self) -> bool[src]

Returns whether this error corresponds to CURLE_ABORTED_BY_CALLBACK.

pub fn is_bad_function_argument(&self) -> bool[src]

Returns whether this error corresponds to CURLE_BAD_FUNCTION_ARGUMENT.

pub fn is_interface_failed(&self) -> bool[src]

Returns whether this error corresponds to CURLE_INTERFACE_FAILED.

pub fn is_too_many_redirects(&self) -> bool[src]

Returns whether this error corresponds to CURLE_TOO_MANY_REDIRECTS.

pub fn is_unknown_option(&self) -> bool[src]

Returns whether this error corresponds to CURLE_UNKNOWN_OPTION.

pub fn is_peer_failed_verification(&self) -> bool[src]

Returns whether this error corresponds to CURLE_PEER_FAILED_VERIFICATION.

pub fn is_got_nothing(&self) -> bool[src]

Returns whether this error corresponds to CURLE_GOT_NOTHING.

pub fn is_ssl_engine_notfound(&self) -> bool[src]

Returns whether this error corresponds to CURLE_SSL_ENGINE_NOTFOUND.

pub fn is_ssl_engine_setfailed(&self) -> bool[src]

Returns whether this error corresponds to CURLE_SSL_ENGINE_SETFAILED.

pub fn is_send_error(&self) -> bool[src]

Returns whether this error corresponds to CURLE_SEND_ERROR.

pub fn is_recv_error(&self) -> bool[src]

Returns whether this error corresponds to CURLE_RECV_ERROR.

pub fn is_ssl_certproblem(&self) -> bool[src]

Returns whether this error corresponds to CURLE_SSL_CERTPROBLEM.

pub fn is_ssl_cipher(&self) -> bool[src]

Returns whether this error corresponds to CURLE_SSL_CIPHER.

pub fn is_ssl_cacert(&self) -> bool[src]

Returns whether this error corresponds to CURLE_SSL_CACERT.

pub fn is_bad_content_encoding(&self) -> bool[src]

Returns whether this error corresponds to CURLE_BAD_CONTENT_ENCODING.

pub fn is_filesize_exceeded(&self) -> bool[src]

Returns whether this error corresponds to CURLE_FILESIZE_EXCEEDED.

pub fn is_use_ssl_failed(&self) -> bool[src]

Returns whether this error corresponds to CURLE_USE_SSL_FAILED.

pub fn is_send_fail_rewind(&self) -> bool[src]

Returns whether this error corresponds to CURLE_SEND_FAIL_REWIND.

pub fn is_ssl_engine_initfailed(&self) -> bool[src]

Returns whether this error corresponds to CURLE_SSL_ENGINE_INITFAILED.

pub fn is_login_denied(&self) -> bool[src]

Returns whether this error corresponds to CURLE_LOGIN_DENIED.

pub fn is_conv_failed(&self) -> bool[src]

Returns whether this error corresponds to CURLE_CONV_FAILED.

pub fn is_conv_required(&self) -> bool[src]

Returns whether this error corresponds to CURLE_CONV_REQD.

pub fn is_ssl_cacert_badfile(&self) -> bool[src]

Returns whether this error corresponds to CURLE_SSL_CACERT_BADFILE.

pub fn is_ssl_crl_badfile(&self) -> bool[src]

Returns whether this error corresponds to CURLE_SSL_CRL_BADFILE.

pub fn is_ssl_shutdown_failed(&self) -> bool[src]

Returns whether this error corresponds to CURLE_SSL_SHUTDOWN_FAILED.

pub fn is_again(&self) -> bool[src]

Returns whether this error corresponds to CURLE_AGAIN.

pub fn is_ssl_issuer_error(&self) -> bool[src]

Returns whether this error corresponds to CURLE_SSL_ISSUER_ERROR.

pub fn is_chunk_failed(&self) -> bool[src]

Returns whether this error corresponds to CURLE_CHUNK_FAILED.

pub fn is_http2_error(&self) -> bool[src]

Returns whether this error corresponds to CURLE_HTTP2.

pub fn is_http2_stream_error(&self) -> bool[src]

Returns whether this error corresponds to CURLE_HTTP2_STREAM.

pub fn code(&self) -> CURLcode[src]

Returns the value of the underlying error corresponding to libcurl.

pub fn extra_description(&self) -> Option<&str>[src]

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

Trait Implementations

impl PartialEq<Error> for Error[src]

impl Clone for Error[src]

default fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl From<NulError> for Error[src]

impl From<Error> for Error[src]

impl Debug for Error[src]

impl Display for Error[src]

impl Error for Error[src]

default fn cause(&self) -> Option<&dyn Error>
1.0.0
[src]

Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

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

default fn source(&self) -> Option<&(dyn Error + 'static)>
1.30.0
[src]

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

default fn type_id(&self) -> TypeId where
    Self: 'static, 
1.34.0
[src]

Gets the TypeId of self

Auto Trait Implementations

impl Send for Error

impl Sync for Error

Blanket Implementations

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T> From for T[src]

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.