#[non_exhaustive]pub enum EmailParseError {
InvalidDisplayFormat,
InvalidCharacters {
character_set: String,
},
InvalidEscapeSequence {
sequence: String,
},
MissingDomain,
MissingLocalPart,
LocalPartLengthExceeded {
length: usize,
max_length: usize,
},
DomainParseError(DomainParseError),
}Expand description
Represents errors that can occur during email address parsing.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
InvalidDisplayFormat
The display name format is invalid.
InvalidCharacters
The email address contains characters that are not allowed.
InvalidEscapeSequence
The email address contains an invalid escape sequence.
MissingDomain
The email address is missing a domain.
MissingLocalPart
The email address is missing a local part.
LocalPartLengthExceeded
The local part of the email address exceeds the maximum allowed length.
DomainParseError(DomainParseError)
The domain part of the email address fails to parse.
Trait Implementations§
Source§impl Clone for EmailParseError
impl Clone for EmailParseError
Source§fn clone(&self) -> EmailParseError
fn clone(&self) -> EmailParseError
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 EmailParseError
impl Debug for EmailParseError
Source§impl Display for EmailParseError
impl Display for EmailParseError
Source§impl Error for EmailParseError
impl Error for EmailParseError
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<DomainParseError> for EmailParseError
impl From<DomainParseError> for EmailParseError
Source§fn from(source: DomainParseError) -> Self
fn from(source: DomainParseError) -> Self
Converts to this type from the input type.
Source§impl PartialEq for EmailParseError
impl PartialEq for EmailParseError
impl Eq for EmailParseError
impl StructuralPartialEq for EmailParseError
Auto Trait Implementations§
impl Freeze for EmailParseError
impl RefUnwindSafe for EmailParseError
impl Send for EmailParseError
impl Sync for EmailParseError
impl Unpin for EmailParseError
impl UnsafeUnpin for EmailParseError
impl UnwindSafe for EmailParseError
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