[][src]Struct sendgrid_rs::mail_settings::MailSettingsBuilder

pub struct MailSettingsBuilder { /* fields omitted */ }

Builder pattern for creating MailSettings Make sure you call build() to consume this builder and get the underlying MailSettings Construct with default().

Methods

impl MailSettingsBuilder
[src]

pub fn bcc(
    self,
    email: impl Into<String>
) -> Self
[src]

Adds the BCC setting to the MailSettings struct. It will always be enabled if this is called. Just specify the email address to BCC.

Examples


let builder = MailSettingsBuilder::default()
              .bcc("bcc@example.com");

pub fn bypass_list_management(self) -> Self
[src]

Turns on the flag for bypass_list_management in MailSettings.

Examples


let builder = MailSettingsBuilder::default()
              .bypass_list_management();

pub fn footer(self, text: Option<String>, html: Option<String>) -> Self
[src]

Adds a footer to MailSettings text form is the optional first parameter, and html is the second. Enabled flag is set to true when this method is called.

Examples


let builder = MailSettingsBuilder::default()
              .footer(Some(String::from("text footer")), Some(String::from("<h1>HTML Footer</h1>")));

pub fn sandbox_mode(self) -> Self
[src]

Enables the sandbox_mode flag for MailSettings

Examples


let builder = MailSettingsBuilder::default()
              .sandbox_mode();

pub fn spam_check(
    self,
    threshold: Option<i32>,
    post_to_url: Option<String>
) -> Self
[src]

Configures the spam_check node for MailSettings

Parameters

threshold: Option post_to_url: Option

Examples


let builder = MailSettingsBuilder::default()
              .spam_check(Some(5), Some(String::from("http://post_url")));

pub fn build(self) -> MailSettings
[src]

Consumes the MailSettingsBuilder and returns the underlying MailSettings

Examples


let builder = MailSettingsBuilder::default()
              .build();

Trait Implementations

impl Default for MailSettingsBuilder
[src]

Auto Trait Implementations

Blanket Implementations

impl<T> From for T
[src]

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

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

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

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

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

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

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

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

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