Enum egg_mode::error::Error [] [src]

pub enum Error {
    BadUrl,
    InvalidResponse(&'static strOption<String>),
    MissingValue(&'static str),
    FutureAlreadyCompleted,
    TwitterError(TwitterErrors),
    RateLimit(i32),
    MediaError(MediaError),
    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

A URL was passed to a shortcut function that didn't match the method being called.

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.

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.

The Future being polled has already returned a completed value (or another error). In order to retry the request, create the Future again.

The response from Twitter returned an error structure instead of the expected response. The enclosed value was the response from Twitter.

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.

An attempt to upload a video or gif successfully uploaded the file, but failed in post-processing. The enclosed value contains the error message from Twitter.

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.

The web request experienced an error. The enclosed error was returned from hyper.

The native_tls implementation returned an error. The enclosed error was returned from native_tls.

An error was experienced while processing the response stream. The enclosed error was returned from libstd.

An error occurred while parsing the JSON resposne. The enclosed error was returned from rustc_serialize.

An error occurred while loading the JSON response. The enclosed error was returned from rustc_serialize.

An error occurred when parsing a timestamp from Twitter. The enclosed error was returned from chrono.

Trait Implementations

impl Debug for Error
[src]

[src]

Formats the value using the given formatter. Read more

impl Display for Error
[src]

[src]

Formats the value using the given formatter. Read more

impl Error for Error
[src]

[src]

A short description of the error. Read more

[src]

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

impl From<Error> for Error
[src]

[src]

Performs the conversion.

impl From<Error> for Error
[src]

[src]

Performs the conversion.

impl From<Error> for Error
[src]

[src]

Performs the conversion.

impl From<ParserError> for Error
[src]

[src]

Performs the conversion.

impl From<DecoderError> for Error
[src]

[src]

Performs the conversion.

impl From<ParseError> for Error
[src]

[src]

Performs the conversion.