[][src]Struct mailjet_rs::common::Recipient

pub struct Recipient {
    pub email: String,
    pub name: String,
}

Email recipient composed by an email address and the name of the owner

Fields

email: Stringname: String

Implementations

impl Recipient[src]

pub fn new(email: &str) -> Self[src]

Creates a new Recipient instance with no name

pub fn with_name(email: &str, name: &str) -> Self[src]

Creates a new Recipient instance with an email and a name

pub fn from_comma_separated(recipients: &str) -> Vec<Self>[src]

Creates a Vec<Recipient from an string slice of comma separated emails.

This function does not support recipients with name provided as string.

pub fn as_comma_separated(&self) -> String[src]

Creates a String of recipients separated by comma.

Example

"John Doe" <john@example.com<

Trait Implementations

impl Debug for Recipient[src]

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

impl Serialize for Recipient[src]

Auto Trait Implementations

Blanket Implementations

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

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

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

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

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

impl<T, U> Into<U> for T where
    U: From<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.