#[non_exhaustive]pub struct EmailAddress {
pub name: Option<String>,
pub email: String,
}Expand description
A parsed email address (RFC 8621 §4.1.2.3).
Represents one address entry from an RFC 5322 address-list.
The email field contains the “addr-spec”; name contains the
decoded display-name, or null if absent.
In RFC 5322 terminology this is a “mailbox” (an addr-spec with optional
display-name), distinct from the JMAP Mailbox folder type.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.name: Option<String>The decoded display-name of the mailbox, or null if absent.
email: StringThe addr-spec of the mailbox (e.g. "user@example.com").
Implementations§
Source§impl EmailAddress
impl EmailAddress
Sourcepub fn new(email: impl Into<String>) -> Self
pub fn new(email: impl Into<String>) -> Self
Construct an EmailAddress with no display name.
Trait Implementations§
Source§impl Clone for EmailAddress
impl Clone for EmailAddress
Source§fn clone(&self) -> EmailAddress
fn clone(&self) -> EmailAddress
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 EmailAddress
impl Debug for EmailAddress
Source§impl<'de> Deserialize<'de> for EmailAddress
impl<'de> Deserialize<'de> for EmailAddress
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for EmailAddress
impl PartialEq for EmailAddress
Source§impl Serialize for EmailAddress
impl Serialize for EmailAddress
impl Eq for EmailAddress
impl StructuralPartialEq for EmailAddress
Auto Trait Implementations§
impl Freeze for EmailAddress
impl RefUnwindSafe for EmailAddress
impl Send for EmailAddress
impl Sync for EmailAddress
impl Unpin for EmailAddress
impl UnsafeUnpin for EmailAddress
impl UnwindSafe for EmailAddress
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