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

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

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.

HitByCaptcha
👎 Deprecated since 0.8.0:

This is jank and always was jank, please stop using it.

If a Yandex search was hit by a captcha, thus preventing the API from doing its job.

Tuple Fields of HitByCaptcha

0: YandexCaptchaUrl
👎 Deprecated since 0.8.0:

This is jank and always was jank, please stop using it.

UnableToFormat

Unable to format. See strfmt::FmtError

Tuple Fields of UnableToFormat

0: FmtError
UnableToConvertToString

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

Tuple Fields of UnableToConvertToString

0: ToStrError
UnableToConvertToFloat

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

Tuple Fields of UnableToConvertToFloat

0: ParseFloatError
FailedRequest

Failed to send request. See reqwest::Error

Tuple Fields of FailedRequest

0: Error
FailedToParseIntoJson

Failed to parse into json. See serde_json::Error

Tuple Fields of FailedToParseIntoJson

0: Error
UnableToRetrieve

Unable to retrieve sauce. A more generic error.

Tuple Fields of UnableToRetrieve

0: &'static str
GenericStr

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

Tuple Fields of GenericStr

0: &'static str
GenericString

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

Tuple Fields of GenericString

0: String

Trait Implementations

Formats the value using the given formatter. Read more

Formats the value using the given formatter. Read more

The lower-level source of this error, if any. Read more

🔬 This is a nightly-only experimental API. (backtrace)

Returns a stack backtrace, if available, of where this error occurred. Read more

👎 Deprecated since 1.42.0:

use the Display impl or to_string()

👎 Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Performs the conversion.

Converts the given value to a String. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.