pub enum MailError {
}Expand description
Mail errors.
Variants§
Smtp(String)
SMTP connection error.
InvalidAddress(String)
Invalid email address.
MissingField(&'static str)
Missing required field.
Template(String)
Template error.
TemplateNotFound(String)
Template not found.
Attachment(String)
Attachment error.
Config(String)
Configuration error.
Provider(String)
Provider API error.
Auth(String)
Authentication error.
RateLimited(u64)
Rate limited.
Io(Error)
I/O error.
Serialization(String)
Serialization error.
Network(String)
Network error.
Timeout
Timeout error.
Queue(String)
Queue error.
Implementations§
Source§impl MailError
impl MailError
Sourcepub fn is_retryable(&self) -> bool
pub fn is_retryable(&self) -> bool
Check if this error is retryable.
Sourcepub fn retry_after(&self) -> Option<Duration>
pub fn retry_after(&self) -> Option<Duration>
Get retry-after duration if rate limited.
Trait Implementations§
Source§impl Error for MailError
impl Error for MailError
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<AddressError> for MailError
impl From<AddressError> for MailError
Source§fn from(err: AddressError) -> Self
fn from(err: AddressError) -> Self
Converts to this type from the input type.
Source§impl From<RenderError> for MailError
Available on crate feature handlebars only.
impl From<RenderError> for MailError
Available on crate feature
handlebars only.Source§fn from(err: RenderError) -> Self
fn from(err: RenderError) -> Self
Converts to this type from the input type.
Source§impl From<TemplateError> for MailError
Available on crate feature handlebars only.
impl From<TemplateError> for MailError
Available on crate feature
handlebars only.Source§fn from(err: TemplateError) -> Self
fn from(err: TemplateError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for MailError
impl !RefUnwindSafe for MailError
impl Send for MailError
impl Sync for MailError
impl Unpin for MailError
impl !UnwindSafe for MailError
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