pub enum EmailValidationError {
Show 17 variants
Empty,
NoAtSymbol,
MultipleAtSymbols,
LocalPartEmpty,
LocalPartTooLong,
DomainEmpty,
DomainTooLong,
InvalidLocalPartCharacter,
InvalidDomainCharacter,
ConsecutiveDots,
LeadingDot,
TrailingDot,
InvalidQuotedString,
UnbalancedQuotes,
InvalidIPLiteral,
DomainLabelTooLong,
TotalLengthExceeded,
}Expand description
Validation error with detailed information about what failed
Variants§
Empty
Email string is empty
NoAtSymbol
No @ symbol found
MultipleAtSymbols
Multiple @ symbols found outside quoted string
LocalPartEmpty
Local part (before @) is empty
LocalPartTooLong
Local part exceeds 64 characters (RFC 5321)
DomainEmpty
Domain part (after @) is empty
DomainTooLong
Domain exceeds 255 characters (RFC 5321)
InvalidLocalPartCharacter
Invalid character in local part
InvalidDomainCharacter
Invalid character in domain
ConsecutiveDots
Consecutive dots (..) in address
LeadingDot
Address starts with a dot
TrailingDot
Address part ends with a dot
InvalidQuotedString
Malformed quoted string in local part
UnbalancedQuotes
Unmatched quote in local part
InvalidIPLiteral
Invalid IP address in domain literal
DomainLabelTooLong
Domain label exceeds 63 characters (RFC 1035)
TotalLengthExceeded
Total email length exceeds 254 characters (RFC 5321)
Trait Implementations§
Source§impl Clone for EmailValidationError
impl Clone for EmailValidationError
Source§fn clone(&self) -> EmailValidationError
fn clone(&self) -> EmailValidationError
Returns a duplicate of the value. Read more
1.0.0 · 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 EmailValidationError
impl Debug for EmailValidationError
Source§impl Display for EmailValidationError
impl Display for EmailValidationError
Source§impl Error for EmailValidationError
impl Error for EmailValidationError
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 PartialEq for EmailValidationError
impl PartialEq for EmailValidationError
impl Eq for EmailValidationError
impl StructuralPartialEq for EmailValidationError
Auto Trait Implementations§
impl Freeze for EmailValidationError
impl RefUnwindSafe for EmailValidationError
impl Send for EmailValidationError
impl Sync for EmailValidationError
impl Unpin for EmailValidationError
impl UnwindSafe for EmailValidationError
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