pub struct Address {
pub name: Option<String>,
pub email: String,
}Expand description
An email address with optional display name.
§References
- RFC 5322 Section 3.4 (address specification)
Fields§
§name: Option<String>Display name, decoded from RFC 2047 encoded words if present.
email: StringEmail address (addr-spec form).
Trait Implementations§
Source§impl Display for Address
impl Display for Address
Source§fn fmt(&self, f: &mut Formatter<'_>) -> Result
fn fmt(&self, f: &mut Formatter<'_>) -> Result
Formats the address per RFC 5322 Section 3.4.
- Non-ASCII display names are RFC 2047 encoded (RFC 5322 Section 2.2 requires header field bodies to be US-ASCII; RFC 2047 Section 5 defines the encoded-word mechanism for non-ASCII text).
- ASCII display names containing specials are quoted per RFC 5322 Section 3.2.4.
- Without display name: bare
email
Source§impl FromStr for Address
impl FromStr for Address
impl Eq for Address
impl StructuralPartialEq for Address
Auto Trait Implementations§
impl Freeze for Address
impl RefUnwindSafe for Address
impl Send for Address
impl Sync for Address
impl Unpin for Address
impl UnsafeUnpin for Address
impl UnwindSafe for Address
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