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

Methods

impl EmailAddress
[src]

Trait Implementations

impl Clone for EmailAddress
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl PartialEq for EmailAddress
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl Debug for EmailAddress
[src]

Formats the value using the given formatter.

impl Display for EmailAddress
[src]

Formats the value using the given formatter. Read more

impl FromStr for EmailAddress
[src]

The associated error which can be returned from parsing.

Parses a string s to return a value of this type. Read more