[][src]Struct riven::RiotApiError

pub struct RiotApiError { /* fields omitted */ }

An error that occurred while processing a Riot API request.

Although Riven may make multiple requests due to retries, this will always contain exactly one reqwest::Error for the final request which failed.

Implementations

impl RiotApiError[src]

pub fn source_reqwest_error(&self) -> &Error[src]

The reqwest::Error for the final failed request.

pub fn retries(&self) -> u8[src]

The number of retires attempted. Zero means exactly one request, zero retries.

pub fn response(&self) -> Option<&Response>[src]

The failed response. Some(reqwest::Response) if the request was sent and failed. None if the request was not sent, OR if parsing the response JSON failed.

pub fn status_code(&self) -> Option<StatusCode>[src]

The failed response's HTTP status code. Some(reqwest::StatusCode) if the request was sent and failed, OR if parsing the response JSON failed. None if the request was not sent.

Trait Implementations

impl Debug for RiotApiError[src]

impl Display for RiotApiError[src]

impl Error for RiotApiError[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.