Struct curl::Error [−][src]
pub struct Error { /* fields omitted */ }
Expand description
An error returned from various “easy” operations.
This structure wraps a CURLcode
.
Implementations
impl Error
[src]
impl Error
[src]pub fn new(code: CURLcode) -> 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]
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]
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]
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]
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]
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]
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]
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]
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]
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]
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]
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]
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]
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]
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]
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]
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]
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]
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]
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]
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]
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]
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]
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]
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]
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]
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]
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]
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]
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]
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]
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]
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]
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]
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]
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]
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]
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]
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]
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]
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]
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]
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]
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]
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]
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]
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]
pub fn is_ssl_shutdown_failed(&self) -> bool
[src]Returns whether this error corresponds to CURLE_SSL_SHUTDOWN_FAILED.
pub fn is_ssl_issuer_error(&self) -> bool
[src]
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]
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]
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]
pub fn is_http2_stream_error(&self) -> bool
[src]Returns whether this error corresponds to CURLE_HTTP2_STREAM.
pub fn code(&self) -> CURLcode
[src]
pub fn code(&self) -> CURLcode
[src]Returns the value of the underlying error corresponding to libcurl.
pub fn description(&self) -> &str
[src]
pub fn description(&self) -> &str
[src]Returns the general description of this error code, using curl’s
builtin strerror
-like functionality.
pub fn extra_description(&self) -> Option<&str>
[src]
pub fn extra_description(&self) -> Option<&str>
[src]Returns the extra description of this error, if any is available.
Trait Implementations
impl Error for Error
[src]
impl Error for Error
[src]fn source(&self) -> Option<&(dyn Error + 'static)>
1.30.0[src]
fn source(&self) -> Option<&(dyn Error + 'static)>
1.30.0[src]The lower-level source of this error, if any. Read more
fn backtrace(&self) -> Option<&Backtrace>
[src]
fn backtrace(&self) -> Option<&Backtrace>
[src]backtrace
)Returns a stack backtrace, if available, of where this error occurred. Read more
fn description(&self) -> &str
1.0.0[src]
fn description(&self) -> &str
1.0.0[src]use the Display impl or to_string()
impl StructuralPartialEq for Error
[src]
Auto Trait Implementations
impl RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnwindSafe for Error
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn to_owned(&self) -> T
[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)
[src]
pub fn clone_into(&self, target: &mut T)
[src]🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more