[][src]Struct azure_functions::send_grid::EmailAddress

pub struct EmailAddress {
    pub email: String,
    pub name: Option<String>,
}

Represents an email address containing the email address and name of the sender or recipient.

Fields

email: String

The email address of the sender or recipient.

name: Option<String>

The name of the sender or recipient.

Methods

impl EmailAddress[src]

pub fn new<T>(email: T) -> EmailAddress where
    T: Into<String>, 
[src]

Creates a new email address.

Examples

let address = EmailAddress::new("foo@example.com");
assert_eq!(address.email, "foo@example.com");
assert_eq!(address.name, None);

pub fn new_with_name<T, U>(email: T, name: U) -> EmailAddress where
    T: Into<String>,
    U: Into<String>, 
[src]

Creates a new email address with the given name.

Examples

let address = EmailAddress::new_with_name("foo@example.com", "Peter");
assert_eq!(address.email, "foo@example.com");
assert_eq!(address.name, Some("Peter".to_string()));

Trait Implementations

impl Clone for EmailAddress[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl<T> From<T> for EmailAddress where
    T: Into<String>, 
[src]

impl Default for EmailAddress[src]

impl Debug for EmailAddress[src]

impl Serialize for EmailAddress[src]

impl<'de> Deserialize<'de> for EmailAddress[src]

Auto Trait Implementations

Blanket Implementations

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]

impl<T> Erased for T