pub enum GmailCodeError {
InvalidConfig(String),
InvalidBaseUrl(String),
InvalidPath(String),
Transport(Error),
Json(Error),
HttpStatus {
url: String,
status: u16,
body: String,
},
BodyDecode {
part_id: String,
source: DecodeError,
},
BodyUtf8 {
part_id: String,
source: FromUtf8Error,
},
}Expand description
Errors returned by Gmail API and verification-code parsing helpers.
Variants§
InvalidConfig(String)
Client configuration failed validation before a request was sent.
InvalidBaseUrl(String)
The configured Gmail API base URL cannot be parsed.
InvalidPath(String)
A Gmail API path could not be joined against the base URL.
Transport(Error)
Network transport failed or the response body could not be read.
Json(Error)
JSON serialization or deserialization failed.
HttpStatus
Gmail returned a non-success HTTP status.
Fields
BodyDecode
A Gmail message body part had invalid base64url content.
Fields
§
source: DecodeErrorBase64 decoder source error.
BodyUtf8
A decoded body part was not valid UTF-8.
Fields
§
source: FromUtf8ErrorUTF-8 decoder source error.
Trait Implementations§
Source§impl Debug for GmailCodeError
impl Debug for GmailCodeError
Source§impl Display for GmailCodeError
impl Display for GmailCodeError
Source§impl Error for GmailCodeError
impl Error for GmailCodeError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl From<Error> for GmailCodeError
impl From<Error> for GmailCodeError
Auto Trait Implementations§
impl Freeze for GmailCodeError
impl !RefUnwindSafe for GmailCodeError
impl Send for GmailCodeError
impl Sync for GmailCodeError
impl Unpin for GmailCodeError
impl UnsafeUnpin for GmailCodeError
impl !UnwindSafe for GmailCodeError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more