pub enum Address<'x> {
Address(EmailAddress<'x>),
Group(GroupedAddresses<'x>),
List(Vec<Address<'x>>),
}
Expand description
RFC5322 address
Variants§
Implementations§
Source§impl<'x> Address<'x>
impl<'x> Address<'x>
Sourcepub fn new_address(
name: Option<impl Into<Cow<'x, str>>>,
email: impl Into<Cow<'x, str>>,
) -> Self
pub fn new_address( name: Option<impl Into<Cow<'x, str>>>, email: impl Into<Cow<'x, str>>, ) -> Self
Create an RFC5322 e-mail address
Sourcepub fn new_group(
name: Option<impl Into<Cow<'x, str>>>,
addresses: Vec<Address<'x>>,
) -> Self
pub fn new_group( name: Option<impl Into<Cow<'x, str>>>, addresses: Vec<Address<'x>>, ) -> Self
Create an RFC5322 grouped e-mail address
pub fn unwrap_address(&self) -> &EmailAddress<'x>
Trait Implementations§
Source§impl<'x> From<Address<'x>> for HeaderType<'x>
impl<'x> From<Address<'x>> for HeaderType<'x>
Source§impl<'x> Ord for Address<'x>
impl<'x> Ord for Address<'x>
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl<'x> PartialOrd for Address<'x>
impl<'x> PartialOrd for Address<'x>
impl<'x> Eq for Address<'x>
impl<'x> StructuralPartialEq for Address<'x>
Auto Trait Implementations§
impl<'x> Freeze for Address<'x>
impl<'x> RefUnwindSafe for Address<'x>
impl<'x> Send for Address<'x>
impl<'x> Sync for Address<'x>
impl<'x> Unpin for Address<'x>
impl<'x> UnwindSafe for Address<'x>
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