error
ModuleThe one error type of the crate.
Contents
use utopia_smtp::Refusal;Rust
pub struct RefusalA refused envelope or message: the server's reply, and each recipient's own refusal when every recipient was refused.
use utopia_smtp::Error;Rust
pub enum ErrorRuntime failures (Error::is_smtp) are the server's or the network's
doing. Error::InvalidArgument and Error::Logic are mistakes in the
calling code: a value that is not an address, a header the message owns,
a transport used before it was connected.
Rust
use utopia_smtp::Address;
let error = Address::new("not an address", "").unwrap_err();
assert!(!error.is_smtp());
assert_eq!(error.php_class(), "InvalidArgumentException");
assert_eq!(error.to_string(), "Not an address: not an address");Also implements
From.