Enum mail_builder::headers::address::Address
source · 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, T, U> From<(U, Vec<T, Global>)> for Address<'x>where
T: Into<Address<'x>>,
U: Into<Cow<'x, str>>,
impl<'x, T, U> From<(U, Vec<T, Global>)> for Address<'x>where
T: Into<Address<'x>>,
U: Into<Cow<'x, str>>,
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> PartialEq<Address<'x>> for Address<'x>
impl<'x> PartialEq<Address<'x>> for Address<'x>
source§impl<'x> PartialOrd<Address<'x>> for Address<'x>
impl<'x> PartialOrd<Address<'x>> for Address<'x>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self and other) and is used by the <=
operator. Read more