pub struct FailureStatus<S>{
pub error: Option<String>,
pub status: S,
pub message: String,
}
Expand description
Represents a sucessful request that was denied by the twitch api for some reason.
Use request’s associated ErrorCodes
to get matchable value.
Fields§
§error: Option<String>
Error message
status: S
The status code of the Failure
If S is ErrorCodes then this is a known error for this request, if u16 then it is not known
message: String
The message twitch sent with the error
Trait Implementations§
Source§impl<S> Debug for FailureStatus<S>
impl<S> Debug for FailureStatus<S>
Source§impl<'de, S> Deserialize<'de> for FailureStatus<S>
impl<'de, S> Deserialize<'de> for FailureStatus<S>
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl<S> Display for FailureStatus<S>
impl<S> Display for FailureStatus<S>
Source§impl<S> Error for FailureStatus<S>
impl<S> Error for FailureStatus<S>
1.30.0 · 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<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<S> Freeze for FailureStatus<S>where
S: Freeze,
impl<S> RefUnwindSafe for FailureStatus<S>where
S: RefUnwindSafe,
impl<S> Send for FailureStatus<S>where
S: Send,
impl<S> Sync for FailureStatus<S>where
S: Sync,
impl<S> Unpin for FailureStatus<S>where
S: Unpin,
impl<S> UnwindSafe for FailureStatus<S>where
S: UnwindSafe,
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