[][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.

Methods

impl RiotApiError[src]

pub fn new(
    reqwest_error: Error,
    retries: u8,
    response: Option<Response>
) -> Self
[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<'a>(&self) -> Option<&Response>[src]

The failed response, if the request was sent and failed. Will be None if JSON parsing failed.

Trait Implementations

impl Debug for RiotApiError[src]

impl Display for RiotApiError[src]

impl Error for RiotApiError[src]

Auto Trait Implementations

Blanket Implementations

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 = !

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.

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

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

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