Enum sauce_api::error::SauceError[][src]

pub enum SauceError {
    LinkIsNotImage,
    UnableToFormat(FmtError),
    UnableToConvertToString(ToStrError),
    UnableToConvertToFloat(ParseFloatError),
    FailedRequest(Error),
    UnableToRetrieve(&'static str),
    GenericStr(&'static str),
    GenericString(String),
}

The various errors that this API can produce.

Variants

LinkIsNotImage

The provided link does not lead to an image file. Or the header does not specify that the Content-Type is an image.

UnableToFormat(FmtError)

Unable to format. See strfmt::FmtError

UnableToConvertToString(ToStrError)

Unable to convert to string. See reqwest::header::ToStrError

UnableToConvertToFloat(ParseFloatError)

Unable to convert to float. See std::num::ParseFloatError

FailedRequest(Error)

Failed to send request. See reqwest::Error

UnableToRetrieve(&'static str)

Unable to retrieve sauce. A more generic error.

GenericStr(&'static str)

A very generic error, one which couldn't be generalized.

GenericString(String)

A very generic error, one which couldn't be generalized.

Trait Implementations

impl Debug for SauceError[src]

impl Display for SauceError[src]

impl Error for SauceError[src]

impl From<Error> for SauceError[src]

impl From<FmtError> for SauceError[src]

impl From<ParseFloatError> for SauceError[src]

impl From<ToStrError> for SauceError[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> Instrument for T[src]

impl<T> Instrument 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.