pub enum Error {
Show 17 variants
InvalidCharacter,
MissingSeparator,
LocalPartEmpty,
LocalPartTooLong,
DomainEmpty,
DomainTooLong,
SubDomainEmpty,
SubDomainTooLong,
DomainTooFew,
DomainInvalidSeparator,
UnbalancedQuotes,
InvalidComment,
InvalidIPAddress,
UnsupportedDomainLiteral,
UnsupportedDisplayName,
MissingDisplayName,
MissingEndBracket,
}
Expand description
Error type used when parsing an address.
Variants§
InvalidCharacter
An invalid character was found in some component of the address.
MissingSeparator
The separator character between local-part
and domain
(character: ‘@’) was missing.
LocalPartEmpty
The local-part
is an empty string.
LocalPartTooLong
The local-part
is is too long.
DomainEmpty
The domain
is an empty string.
DomainTooLong
The domain
is is too long.
SubDomainEmpty
The sub-domain
within the domain
is empty.
SubDomainTooLong
A sub-domain
within the domain
is is too long.
DomainTooFew
Too few sub-domain
s in domain
.
DomainInvalidSeparator
Invalid placement of the domain separator (character: ‘.’).
UnbalancedQuotes
The quotes (character: ‘“’) around local-part
are unbalanced.
InvalidComment
A Comment within the either the local-part
, or domain
, was malformed.
InvalidIPAddress
An IP address in a domain-literal
was malformed.
UnsupportedDomainLiteral
A domain-literal
was supplied, but is unsupported by parser configuration.
UnsupportedDisplayName
Display name was supplied, but is unsupported by parser configuration.
MissingDisplayName
Display name was not supplied, but email starts with ‘<’.
MissingEndBracket
An email enclosed within <…> is missing the final ‘>’.