Enum algorithmia::error::ErrorKind
[−]
pub enum ErrorKind { Msg(String), Api(ApiError), Http(String), InvalidBaseUrl, InvalidDataUri(String), InvalidAlgoUri(String), DecodeJson(&'static str), EncodeJson(&'static str), DecodeBase64(&'static str), Io(String), InvalidContentType(String), MismatchedContentType(&'static str), UnexpectedContentType(&'static str, String), NotFound(Url), MissingDataType, InvalidDataType(String), UnexpectedDataType(&'static str, String), UnsupportedInput, // some variants omitted }
The kind of an error.
Variants
Msg(String)
A convenient variant for String.
Api(ApiError)
Error from the Algorithmia API (may be from the algorithm)
Http(String)
Http errors calling the API
InvalidBaseUrl
Base URL couldn't be parsed as a Url
InvalidDataUri(String)
Invalid Data URI
InvalidAlgoUri(String)
Invalid Algorithm URI
DecodeJson(&'static str)
Error decoding JSON
EncodeJson(&'static str)
Error encoding JSON
DecodeBase64(&'static str)
Error decoding base64
Io(String)
I/O errors reading or writing data
InvalidContentType(String)
API responded with unknown content type
MismatchedContentType(&'static str)
Content was not valid for the specified content-type
UnexpectedContentType(&'static str, String)
Content type is not the expected content type
NotFound(Url)
Encountered 404 Not Found
MissingDataType
API response was missing a data type header
InvalidDataType(String)
API response included an unknown data type header
UnexpectedDataType(&'static str, String)
API response included an unexpected data type header
UnsupportedInput
Entrypoint not defined for input type
Methods
impl ErrorKind
fn description(&self) -> &str
A string describing the error kind.