[][src]Enum top_gg::error::Error

pub enum Error {
    ChunkingText {
        source: ReqwestError,
    },
    Deserializing {
        source: JsonError,
        text: String,
    },
    InvalidHeaderValue {
        name: HeaderName,
        source: ReqwestInvalidHeaderValue,
        value: String,
    },
    InvalidUrl {
        source: UrlParseError,
        uri: String,
    },
    Request {
        source: ReqwestError,
    },
    TokenMissing,
}

An error type to compose a singular error enum between various dependencies' errors.

Variants

ChunkingText

The response body couldn't be chunked as a UTF-8 valid string.

Fields of ChunkingText

source: ReqwestError

The reason for the error.

Deserializing

An error from the serde_json crate.

A potential reason for this is when there is an error deserializing a JSON response body.

Fields of Deserializing

source: JsonError

The reason for the error.

text: String

The payload that couldn't be deserialized.

InvalidHeaderValue

A header value was invalid.

Fields of InvalidHeaderValue

name: HeaderName

The name of the header.

source: ReqwestInvalidHeaderValue

The reason for the error.

value: String

The value that couldn't be parsed.

InvalidUrl

The formatted URL is invalid.

This is likely a library issue.

Fields of InvalidUrl

source: UrlParseError

The reason for the error.

uri: String

The URI that couldn't be parsed.

Request

An error from the reqwest crate.

Fields of Request

source: ReqwestError

The reason for the error.

TokenMissing

A token is needed for this request but wasn't present.

Trait Implementations

impl From<Error> for Error[src]

impl Display for Error[src]

impl Debug for Error[src]

impl Error for Error where
    Self: Debug + Display
[src]

impl ErrorCompat for Error[src]

Auto Trait Implementations

impl Send for Error

impl Sync for Error

impl Unpin for Error

impl !UnwindSafe for Error

impl !RefUnwindSafe for Error

Blanket Implementations

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

impl<T> From<T> for 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.

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]

impl<T> AsErrorSource for T where
    T: 'static + Error
[src]