[][src]Struct sendgrid_rs::tracking_settings::TrackingSettingsBuilder

pub struct TrackingSettingsBuilder { /* fields omitted */ }

Builder pattern for TrackingSettings. Make sure you call build() to consume this and return the underlying TrackingSetting. Construct with default().

Methods

impl TrackingSettingsBuilder
[src]

pub fn click_tracking(self, enable_text: bool) -> Self
[src]

Sets the click_tracking setting enabled to be true. Pass true to this method to enable text tracking as well.

Examples


let builder = TrackingSettingsBuilder::default()
              .click_tracking(true);

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

Sets the open_tracking stting enabled to be true. Pass in the substitution_tag to be replaced with it.

Examples


let builder = TrackingSettingsBuilder::default()
              .open_tracking("[OPEN_TAG]");

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

Sets the substitution tag and text and/or html for subscription_tracking

Parameters

substitution_tag: impl Intl text: Option html: Option

Examples


let builder = TrackingSettingsBuilder::default()
              .substitution_tag("[SUBSTITUTION_TAG]", None, None);

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

Consumes the TrackingSettingsBuilder and returns the underlying TrackingSettings

Examples


let setting = TrackingSettingsBuilder::default().build();

Trait Implementations

impl Default for TrackingSettingsBuilder
[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]