Enum bigml::Error[][src]

#[non_exhaustive]
pub enum Error {
    CouldNotAccessUrl {
        url: Url,
        error: Box<Error>,
    },
    CouldNotGetOutput {
        name: String,
        error: Box<Error>,
    },
    CouldNotParseUrlWithDomain {
        domain: String,
        error: Box<ParseError>,
    },
    CouldNotReadFile {
        path: PathBuf,
        error: Box<Error>,
    },
    OutputNotAvailable,
    PaymentRequired {
        url: Url,
        body: String,
    },
    Timeout,
    UnexpectedHttpStatus {
        url: Url,
        status: StatusCode,
        body: String,
    },
    WaitFailed {
        id: String,
        message: String,
    },
    WrongResourceType {
        expected: &'static str,
        found: String,
    },
    Other {
        error: Error,
    },
}
Expand description

A BigML-related error.

Variants (Non-exhaustive)

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
CouldNotAccessUrl

We could not access the specified URL.

WARNING: Do not construct this directly, but use Error::could_not_access_url to handle various URL sanitization and security issues.

Fields of CouldNotAccessUrl

url: Urlerror: Box<Error>
CouldNotGetOutput

We could not get an output value from a WhizzML script.

Fields of CouldNotGetOutput

name: Stringerror: Box<Error>
CouldNotParseUrlWithDomain

We could not parse the specified URL.

WARNING: This takes a domain, not the full URL that we couldn’t parse, because we want to be careful to exclude credentials from error messages, and we can’t remove credentials from a URL we can’t parse.

Fields of CouldNotParseUrlWithDomain

domain: Stringerror: Box<ParseError>
CouldNotReadFile

We could not read a file.

Fields of CouldNotReadFile

path: PathBuferror: Box<Error>
OutputNotAvailable

We could not access an output value of a WhizzML script.

PaymentRequired

BigML says that payment is required for this request, perhaps because we have hit plan limits.

Fields of PaymentRequired

url: Urlbody: String
Timeout

A request timed out.

UnexpectedHttpStatus

We received an unexpected HTTP status code.

Fields of UnexpectedHttpStatus

url: Urlstatus: StatusCodebody: String
WaitFailed

We tried to create a BigML resource, but we failed. Display a dashboard URL to make it easy to look up the actual error.

Fields of WaitFailed

id: String

The ID of the resource that we were waiting on.

message: String

The message that was returned.

WrongResourceType

We found a type mismatch deserializing a BigML resource ID.

Fields of WrongResourceType

expected: &'static strfound: String
Other

Another kind of error occurred.

Fields of Other

error: Error

Implementations

Is this error likely to be temporary?

Return the original bigml::Error that caused this error, without any wrapper errors.

Trait Implementations

Formats the value using the given formatter. Read more

Formats the value using the given formatter. Read more

Returns the “name” of the error. Read more

Returns a reference to the underlying cause of this failure, if it is an error that wraps other errors. Read more

Returns a reference to the Backtrace carried by this failure, if it carries one. Read more

Provides context for this failure. Read more

Wraps this failure in a compatibility wrapper that implements std::error::Error. Read more

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Converts a reference to Self into a dynamic trait object of Fail.

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.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more