#[non_exhaustive]pub enum MailerError {
ConfigurationMissing(String),
Transient(String),
Permanent(String),
}Expand description
Errors a Mailer can return. The most important variant is
MailerError::ConfigurationMissing — the framework treats it
as a hard boot failure when production deployments forget to wire
up a real mailer (per the user-locked decision: “Mailer blocking
behaviour” → refuse to start when no mailer is configured for
production).
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
ConfigurationMissing(String)
The mailer is structurally missing — no transport, no API key, etc. R1+ boot guards check for this at startup.
Transient(String)
A transient failure (SMTP timeout, 5xx from the API, queue
full). Recovery flows treat this as “log + uniform user
response” per the user-locked mailer-blocking-behaviour
decision: the user sees the same response as success; an
audit row is written with metadata.email_send_status = "failed" so the operator can grep for undelivered resets.
Permanent(String)
A non-recoverable failure (invalid recipient, blocked domain). Surfaces in audit logs the same way as Transient.
Trait Implementations§
Source§impl Debug for MailerError
impl Debug for MailerError
Source§impl Display for MailerError
impl Display for MailerError
Source§impl Error for MailerError
impl Error for MailerError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Auto Trait Implementations§
impl Freeze for MailerError
impl RefUnwindSafe for MailerError
impl Send for MailerError
impl Sync for MailerError
impl Unpin for MailerError
impl UnsafeUnpin for MailerError
impl UnwindSafe for MailerError
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more