pub enum AddressValidationError {
Empty,
MissingAt,
TooManyAtSigns,
EmptyLocalPart,
EmptyDomain,
InvalidLocalPart,
InvalidDomain,
InvalidDisplayName,
NonAscii,
}Expand description
Error returned when an email address primitive fails validation.
Variants§
Empty
The supplied value was empty after trimming.
MissingAt
The address did not contain an at sign.
TooManyAtSigns
The address contained more than one at sign.
EmptyLocalPart
The local part was empty.
EmptyDomain
The domain part was empty.
InvalidLocalPart
The local part used syntax rejected by this crate’s conservative rules.
InvalidDomain
The domain part used syntax rejected by this crate’s conservative rules.
InvalidDisplayName
The display name used syntax rejected by this crate’s conservative rules.
NonAscii
The selected validation mode requires ASCII text.
Trait Implementations§
Source§impl Clone for AddressValidationError
impl Clone for AddressValidationError
Source§fn clone(&self) -> AddressValidationError
fn clone(&self) -> AddressValidationError
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for AddressValidationError
impl Debug for AddressValidationError
Source§impl Display for AddressValidationError
impl Display for AddressValidationError
Source§impl Error for AddressValidationError
impl Error for AddressValidationError
1.30.0 · 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<AddressValidationError> for MailtoError
impl From<AddressValidationError> for MailtoError
Source§fn from(value: AddressValidationError) -> MailtoError
fn from(value: AddressValidationError) -> MailtoError
Converts to this type from the input type.
Source§impl From<AddressValidationError> for SmtpError
impl From<AddressValidationError> for SmtpError
Source§fn from(value: AddressValidationError) -> SmtpError
fn from(value: AddressValidationError) -> SmtpError
Converts to this type from the input type.
Source§impl Hash for AddressValidationError
impl Hash for AddressValidationError
Source§impl Ord for AddressValidationError
impl Ord for AddressValidationError
Source§fn cmp(&self, other: &AddressValidationError) -> Ordering
fn cmp(&self, other: &AddressValidationError) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for AddressValidationError
impl PartialEq for AddressValidationError
Source§fn eq(&self, other: &AddressValidationError) -> bool
fn eq(&self, other: &AddressValidationError) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialOrd for AddressValidationError
impl PartialOrd for AddressValidationError
impl Copy for AddressValidationError
impl Eq for AddressValidationError
impl StructuralPartialEq for AddressValidationError
Auto Trait Implementations§
impl Freeze for AddressValidationError
impl RefUnwindSafe for AddressValidationError
impl Send for AddressValidationError
impl Sync for AddressValidationError
impl Unpin for AddressValidationError
impl UnsafeUnpin for AddressValidationError
impl UnwindSafe for AddressValidationError
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