Struct emailaddress::EmailAddress
[−]
[src]
pub struct EmailAddress { pub local: String, pub domain: String, }
Email address data structure
Represents an email address, right now just the name@domain
portion.
Example
use emailaddress::EmailAddress; let email = match EmailAddress::new("someone@example.com") { Ok(addr) => addr, Err(e) => panic!("Error parsing address, error was {}", e), }; assert_eq!(&email.local, "someone"); assert_eq!(&email.domain, "example.com");
Fields
local: String
domain: String
Methods
impl EmailAddress
[src]
fn new(string: &str) -> Result<EmailAddress, AddrError>
Trait Implementations
impl Clone for EmailAddress
[src]
fn clone(&self) -> EmailAddress
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
impl PartialEq for EmailAddress
[src]
fn eq(&self, __arg_0: &EmailAddress) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &EmailAddress) -> bool
This method tests for !=
.