pub enum Error {
InvalidResponse(&'static str, Option<String>),
MissingValue(&'static str),
TwitterError(TwitterErrors),
RateLimit(i32),
BadStatus(StatusCode),
NetError(Error),
IOError(Error),
JSONError(ParserError),
DecodeError(DecoderError),
}
A set of errors that can occur when interacting with Twitter.
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.
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.
The response from Twitter gave a response code that indicated an error. The enclosed value
was the response code.
The web request experienced an error. The enclosed value was returned from hyper.
An error was experienced while processing the response stream. The enclosed value was
returned from libstd.
An error occurred while parsing the JSON resposne. The enclosed value was returned from
rustc_serialize.
An error occurred while loading the JSON response. The enclosed value was returned from
rustc_serialize.
Formats the value using the given formatter. Read more
Formats the value using the given formatter. Read more
Deprecating in 1.33.0
: replaced by Error::source, which can support downcasting
The lower-level cause of this error, if any. Read more
The lower-level source of this error, if any. Read more
Converts the given value to a String
. Read more
🔬 This is a nightly-only experimental API. (try_from
)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from
)
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
🔬 This is a nightly-only experimental API. (try_from
)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from
)
🔬 This is a nightly-only experimental API. (get_type_id
)
this method will likely be replaced by an associated static
Get the TypeId
of this object.