pub enum RelayConfigError {
InvalidUrl {
url: String,
source: InvalidUri,
},
InvalidToken,
Tls(String),
}Expand description
Building an EmailRelayClient failed — a startup-time misconfiguration,
never a runtime condition.
Variants§
InvalidUrl
The configured relay origin does not parse as a URI.
Fields
§
source: InvalidUriThe underlying URI parse error.
InvalidToken
The configured bearer token is not a valid HTTP header value (e.g. it
contains a control character). Caught eagerly here because
ClientConfig::with_default_header silently drops an invalid value
instead of erroring, which would otherwise turn a bad token into an
unexplained unauthenticated on every send.
Tls(String)
Building the TLS client for an https:// relay origin failed (e.g. no
process-default crypto provider). Fails closed rather than silently
downgrading to plaintext.
Trait Implementations§
Source§impl Debug for RelayConfigError
impl Debug for RelayConfigError
Source§impl Display for RelayConfigError
impl Display for RelayConfigError
Source§impl Error for RelayConfigError
impl Error for RelayConfigError
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()
Auto Trait Implementations§
impl Freeze for RelayConfigError
impl RefUnwindSafe for RelayConfigError
impl Send for RelayConfigError
impl Sync for RelayConfigError
impl Unpin for RelayConfigError
impl UnsafeUnpin for RelayConfigError
impl UnwindSafe for RelayConfigError
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