pub enum GmailSendError {
Send(Http11SendError),
SerializeRequest(Error),
ParseResponse(Error),
ParseUrl(ParseError),
InvalidRequest(String),
Api {
status: u16,
message: String,
},
UnexpectedRedirect,
}Expand description
Errors that can occur during a Gmail exchange.
Variants§
Send(Http11SendError)
The underlying HTTP exchange failed.
SerializeRequest(Error)
The request body could not be serialized to JSON.
ParseResponse(Error)
The 2xx response body could not be parsed as JSON.
ParseUrl(ParseError)
The request URL could not be built.
InvalidRequest(String)
The request was rejected before being sent.
Api
Gmail returned a non-2xx status with its error envelope.
Fields
UnexpectedRedirect
The server answered with a redirect, which is never followed.
Implementations§
Trait Implementations§
Source§impl Debug for GmailSendError
impl Debug for GmailSendError
Source§impl Display for GmailSendError
impl Display for GmailSendError
Source§impl Error for GmailSendError
impl Error for GmailSendError
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<GmailSendError> for GmailClientStdError
Available on crate feature client only.
impl From<GmailSendError> for GmailClientStdError
Available on crate feature
client only.Source§fn from(source: GmailSendError) -> Self
fn from(source: GmailSendError) -> Self
Converts to this type from the input type.
Source§impl From<GmailSendError> for GmailHistoryPollError
impl From<GmailSendError> for GmailHistoryPollError
Source§fn from(source: GmailSendError) -> Self
fn from(source: GmailSendError) -> Self
Converts to this type from the input type.
Source§impl From<Http11SendError> for GmailSendError
impl From<Http11SendError> for GmailSendError
Source§fn from(source: Http11SendError) -> Self
fn from(source: Http11SendError) -> Self
Converts to this type from the input type.
Source§impl From<ParseError> for GmailSendError
impl From<ParseError> for GmailSendError
Source§fn from(source: ParseError) -> Self
fn from(source: ParseError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for GmailSendError
impl RefUnwindSafe for GmailSendError
impl Send for GmailSendError
impl Sync for GmailSendError
impl Unpin for GmailSendError
impl UnsafeUnpin for GmailSendError
impl UnwindSafe for GmailSendError
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