Enum quandl_v3::Error
[−]
[src]
pub enum Error { ApiCallFailed(ApiErrorResponse), DownloadFailed(String), ParsingFailed(String), IoError(String), }
Crate-wide error value. This enumerate the only four possible source of failures in this crate.
Variants
ApiCallFailed(ApiErrorResponse)
Is returned when Quandl's reply to a query with an error. The contained ApiErrorResponse
contains very verbose information about what went wrong with any specific query.
DownloadFailed(String)
Is returned when a problem occurs while exchanging informaiton with the Quandl's servers. It could mean the Internet connection was lost, that the remote server closed the connection unexpectedly, etc.
Unfortunately, the current implementation for network connection (hyper) has very weak error reporting and thus might leave the user confused as to why such an error is returned.
ParsingFailed(String)
Is returned when the received value, assuming Quandl didn't respond with an error and that
there was no download error, breaks one of the parsers' assumption. Most of the time it
would be an error from rustc_serialize
(which also does not report very meaningful errors
unfortunately) or it could also be a custom message from this library for data which didn't
met the format deserializable by the rustc_serialize
crate.
IoError(String)
Is returned when an I/O operation fails. This last error is highly system-dependant and again, the error message string returned are not always very verbose.
Trait Implementations
impl Debug for Error
[src]
impl Clone for Error
[src]
fn clone(&self) -> Error
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl PartialEq for Error
[src]
fn eq(&self, __arg_0: &Error) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Error) -> bool
This method tests for !=
.
impl Error for Error
[src]
fn description(&self) -> &str
A short description of the error. Read more
fn cause(&self) -> Option<&Error>
1.0.0
The lower-level cause of this error, if any. Read more