Struct mailbox::Address
[−]
[src]
pub struct Address { /* fields omitted */ }
Represents an email address, composed of name, user and host.
Methods
impl Address
[src]
fn parse<T: AsRef<str>>(string: T) -> Result<Self>
fn name(&self) -> Option<&str>
The name if any.
This is the first part of an address, which can be bare or quoted, for
example "Someone Somewhere" <someone@somewhe.re>
or Someone Somewhere <someone@somewhe.re>
.
fn user(&self) -> &str
The user.
This is the only mandatory part of an address, for instance it can be
preceded by the name
and followed by a @
and the host, or be the
only part of an address.
fn host(&self) -> Option<&str>
The host if any.
This is the part after the user
preceded by a @
.
Trait Implementations
impl Eq for Address
[src]
impl PartialEq for Address
[src]
fn eq(&self, __arg_0: &Address) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Address) -> bool
This method tests for !=
.
impl Clone for Address
[src]
fn clone(&self) -> Address
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more