Enum egg_mode::error::Error
[−]
[src]
pub enum Error { BadUrl, InvalidResponse(&'static str, Option<String>), MissingValue(&'static str), FutureAlreadyCompleted, TwitterError(TwitterErrors), RateLimit(i32), BadStatus(StatusCode), NetError(Error), TlsError(Error), IOError(Error), JSONError(ParserError), DecodeError(DecoderError), TimestampParseError(ParseError), }
A set of errors that can occur when interacting with Twitter.
Variants
BadUrl
A URL was passed to a shortcut function that didn't match the method being called.
InvalidResponse(&'static str, Option<String>)
The response from Twitter was formatted incorrectly or in an unexpected manner. The enclosed values are an explanatory string and, if applicable, the input that caused the error.
This usually reflects a bug in this library, as it means I'm not parsing input right.
MissingValue(&'static str)
The response from Twitter was missing an expected value. The enclosed value was the expected parameter.
This usually reflects a bug in this library, as it means I'm expecting a value that may not always be there, and need to update my parsing to reflect this.
FutureAlreadyCompleted
The Future
being polled has already returned a completed value (or another error). In
order to retry the request, create the Future
again.
TwitterError(TwitterErrors)
The response from Twitter returned an error structure instead of the expected response. The enclosed value was the response from Twitter.
RateLimit(i32)
The response returned from Twitter contained an error indicating that the rate limit for that method has been reached. The enclosed value is the Unix timestamp in UTC when the next rate-limit window will open.
BadStatus(StatusCode)
The response from Twitter gave a response code that indicated an error. The enclosed value was the response code.
This is only returned if Twitter did not also return an error code in the response body. That check is performed before examining the status code.
NetError(Error)
The web request experienced an error. The enclosed error was returned from hyper.
TlsError(Error)
The native_tls
implementation returned an error. The enclosed error was returned from
native_tls
.
IOError(Error)
An error was experienced while processing the response stream. The enclosed error was returned from libstd.
JSONError(ParserError)
An error occurred while parsing the JSON resposne. The enclosed error was returned from rustc_serialize.
DecodeError(DecoderError)
An error occurred while loading the JSON response. The enclosed error was returned from rustc_serialize.
TimestampParseError(ParseError)
An error occurred when parsing a timestamp from Twitter. The enclosed error was returned from chrono.
Trait Implementations
impl Debug for Error
[src]
impl Display for Error
[src]
fn fmt(&self, f: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl Error for Error
[src]
fn description(&self) -> &str
[src]
A short description of the error. Read more
fn cause(&self) -> Option<&Error>
[src]
The lower-level cause of this error, if any. Read more
impl From<Error> for Error
[src]
impl From<Error> for Error
[src]
impl From<Error> for Error
[src]
impl From<ParserError> for Error
[src]
fn from(err: ParserError) -> Error
[src]
Performs the conversion.
impl From<DecoderError> for Error
[src]
fn from(err: DecoderError) -> Error
[src]
Performs the conversion.
impl From<ParseError> for Error
[src]
fn from(err: ParseError) -> Error
[src]
Performs the conversion.