Mercurial > lbo > hg > async-google-apis
view async-google-apis-common/src/error.rs @ 133:5b04a34b3aa2
Added tag common_v0.1.7 for changeset f87d7be7c3d7
author | Lewin Bormann <lbo@spheniscida.de> |
---|---|
date | Mon, 26 Oct 2020 10:46:14 +0100 |
parents | 5ce43ba206c7 |
children |
line wrap: on
line source
#[derive(Debug)] pub enum ApiError { /// The API returned a non-OK HTTP response. HTTPResponseError(hyper::StatusCode, String), /// Returned after being redirected more than five times. HTTPTooManyRedirectsError, /// E.g. a redirect was issued without a Location: header. RedirectError(String), /// Invalid data was supplied to the library. InputDataError(String), /// Data for download is available, but the caller hasn't supplied a destination to write to. DataAvailableError(String), } impl std::error::Error for ApiError {} impl std::fmt::Display for ApiError { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { std::fmt::Debug::fmt(self, f) } }