pub struct TrackingSettingsBuilder { /* private fields */ }
Expand description
Builder pattern for TrackingSettings
. Make sure you call build()
to consume this and return
the underlying TrackingSetting
. Construct with default().
Implementations§
Source§impl TrackingSettingsBuilder
impl TrackingSettingsBuilder
Sourcepub fn click_tracking(self, enable_text: bool) -> Self
pub fn click_tracking(self, enable_text: bool) -> Self
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);
Sourcepub fn open_tracking(self, substitution_tag: impl Into<String>) -> Self
pub fn open_tracking(self, substitution_tag: impl Into<String>) -> Self
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]");
Sourcepub fn substitution_tag(
self,
substitution_tag: impl Into<String>,
text: Option<String>,
html: Option<String>,
) -> Self
pub fn substitution_tag( self, substitution_tag: impl Into<String>, text: Option<String>, html: Option<String>, ) -> Self
Sourcepub fn build(self) -> TrackingSettings
pub fn build(self) -> TrackingSettings
Consumes the TrackingSettingsBuilder
and returns the underlying TrackingSettings
§Examples
let setting = TrackingSettingsBuilder::default().build();
Trait Implementations§
Source§impl Default for TrackingSettingsBuilder
impl Default for TrackingSettingsBuilder
Source§fn default() -> TrackingSettingsBuilder
fn default() -> TrackingSettingsBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for TrackingSettingsBuilder
impl RefUnwindSafe for TrackingSettingsBuilder
impl Send for TrackingSettingsBuilder
impl Sync for TrackingSettingsBuilder
impl Unpin for TrackingSettingsBuilder
impl UnwindSafe for TrackingSettingsBuilder
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more