#[non_exhaustive]pub enum RequestParseError {
DeserializeError(Error),
TwitchError(TwitchTokenErrorResponse),
NotJson {
found: String,
},
Other(StatusCode),
}
Expand description
Errors from parsing responses
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
DeserializeError(Error)
deserialization failed
TwitchError(TwitchTokenErrorResponse)
twitch returned an error
NotJson
returned content is not application/json
, found {found}
Other(StatusCode)
twitch returned an unexpected status code: {0}
Trait Implementations§
Source§impl Debug for RequestParseError
impl Debug for RequestParseError
Source§impl Display for RequestParseError
impl Display for RequestParseError
Source§impl Error for RequestParseError
impl Error for RequestParseError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§impl From<Error> for RequestParseError
impl From<Error> for RequestParseError
Source§impl<RE: Error + Send + Sync + 'static> From<RequestParseError> for AppAccessTokenError<RE>
impl<RE: Error + Send + Sync + 'static> From<RequestParseError> for AppAccessTokenError<RE>
Source§fn from(source: RequestParseError) -> Self
fn from(source: RequestParseError) -> Self
Converts to this type from the input type.
Source§impl<RE: Error + Send + Sync + 'static> From<RequestParseError> for RefreshTokenError<RE>
impl<RE: Error + Send + Sync + 'static> From<RequestParseError> for RefreshTokenError<RE>
Source§fn from(source: RequestParseError) -> Self
fn from(source: RequestParseError) -> Self
Converts to this type from the input type.
Source§impl<RE: Error + Send + Sync + 'static> From<RequestParseError> for RevokeTokenError<RE>
impl<RE: Error + Send + Sync + 'static> From<RequestParseError> for RevokeTokenError<RE>
Source§fn from(source: RequestParseError) -> Self
fn from(source: RequestParseError) -> Self
Converts to this type from the input type.
Source§impl<RE: Error + Send + Sync + 'static> From<RequestParseError> for UserTokenExchangeError<RE>
impl<RE: Error + Send + Sync + 'static> From<RequestParseError> for UserTokenExchangeError<RE>
Source§fn from(source: RequestParseError) -> Self
fn from(source: RequestParseError) -> Self
Converts to this type from the input type.
Source§impl<RE: Error + Send + Sync + 'static> From<RequestParseError> for ValidationError<RE>
impl<RE: Error + Send + Sync + 'static> From<RequestParseError> for ValidationError<RE>
Source§fn from(source: RequestParseError) -> Self
fn from(source: RequestParseError) -> Self
Converts to this type from the input type.
Source§impl From<TwitchTokenErrorResponse> for RequestParseError
impl From<TwitchTokenErrorResponse> for RequestParseError
Source§fn from(source: TwitchTokenErrorResponse) -> Self
fn from(source: TwitchTokenErrorResponse) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for RequestParseError
impl !RefUnwindSafe for RequestParseError
impl Send for RequestParseError
impl Sync for RequestParseError
impl Unpin for RequestParseError
impl !UnwindSafe for RequestParseError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more