pub enum RequestError<C: ErrorCodes + 'static> {
MissingAuth,
MalformedRequest(String),
ScopesError(Vec<String>),
KnownErrorStatus(FailureStatus<C>),
UnkownErrorStatus(FailureStatus<u16>),
ReqwestError(Error),
UnknownError(Box<dyn Error>),
}
Expand description
Returned from a request when it could not be completed
Variants§
MissingAuth
Returned when this endpoint was not given a valid authorization key
MalformedRequest(String)
Could not try to make request because it was malformed in some way
ScopesError(Vec<String>)
Did not have the correct user scopes available to make request.
KnownErrorStatus(FailureStatus<C>)
Encountered a known error status, match on 0.status
for all C::*
UnkownErrorStatus(FailureStatus<u16>)
Encountered an unknown error status from twitch
ReqwestError(Error)
Reqwest could not complete the request for some reason
UnknownError(Box<dyn Error>)
Unknown error
Trait Implementations§
Source§impl<C: Debug + ErrorCodes + 'static> Debug for RequestError<C>
impl<C: Debug + ErrorCodes + 'static> Debug for RequestError<C>
Source§impl<C: ErrorCodes + 'static> Display for RequestError<C>where
FailureStatus<C>: Display,
impl<C: ErrorCodes + 'static> Display for RequestError<C>where
FailureStatus<C>: Display,
Source§impl<C: ErrorCodes + 'static> Error for RequestError<C>
impl<C: ErrorCodes + 'static> Error for RequestError<C>
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<C: ErrorCodes + 'static> From<Box<dyn Error>> for RequestError<C>
impl<C: ErrorCodes + 'static> From<Box<dyn Error>> for RequestError<C>
Source§impl<C: ErrorCodes + 'static> From<Error> for RequestError<C>
impl<C: ErrorCodes + 'static> From<Error> for RequestError<C>
Source§impl<E: ErrorCodes> From<FailureStatus<u16>> for RequestError<E>
impl<E: ErrorCodes> From<FailureStatus<u16>> for RequestError<E>
Source§fn from(failure: FailureStatus<u16>) -> Self
fn from(failure: FailureStatus<u16>) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl<C> Freeze for RequestError<C>where
C: Freeze,
impl<C> !RefUnwindSafe for RequestError<C>
impl<C> !Send for RequestError<C>
impl<C> !Sync for RequestError<C>
impl<C> Unpin for RequestError<C>where
C: Unpin,
impl<C> !UnwindSafe for RequestError<C>
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