pub struct CreateContactOptions { /* private fields */ }Expand description
Details of a new Contact.
Implementations§
Source§impl CreateContactOptions
impl CreateContactOptions
Sourcepub fn new(email: &str) -> Self
pub fn new(email: &str) -> Self
Creates a new CreateContactOptions.
Sourcepub fn with_audience_id(self, audience_id: &str) -> Self
pub fn with_audience_id(self, audience_id: &str) -> Self
Adds the audience id to the contact.
Sourcepub fn with_first_name(self, name: &str) -> Self
pub fn with_first_name(self, name: &str) -> Self
Adds the first name to the contact.
Sourcepub fn with_last_name(self, name: &str) -> Self
pub fn with_last_name(self, name: &str) -> Self
Adds the last name to the contact.
Sourcepub const fn with_unsubscribed(self, unsubscribed: bool) -> Self
pub const fn with_unsubscribed(self, unsubscribed: bool) -> Self
Toggles the unsubscribe status to unsubscribe.
Sourcepub fn with_property(self, key: &str, value: &str) -> Self
pub fn with_property(self, key: &str, value: &str) -> Self
Adds a custom property to the contact.
Sourcepub fn with_properties(self, properties: HashMap<String, String>) -> Self
pub fn with_properties(self, properties: HashMap<String, String>) -> Self
Adds custom properties to the contact.
Sourcepub fn with_segment(self, id: &str) -> Self
pub fn with_segment(self, id: &str) -> Self
Adds a segment ID to add the contact to.
Sourcepub fn with_segments(self, ids: &[String]) -> Self
pub fn with_segments(self, ids: &[String]) -> Self
Adds multiple segment IDs to add the contact to.
Sourcepub fn with_topic(self, topic: UpdateContactTopicOptions) -> Self
pub fn with_topic(self, topic: UpdateContactTopicOptions) -> Self
Adds a topic subscription for the contact.
Sourcepub fn with_topics(self, topics: &[UpdateContactTopicOptions]) -> Self
pub fn with_topics(self, topics: &[UpdateContactTopicOptions]) -> Self
Adds multiple topic subscriptions for the contact.
Trait Implementations§
Source§impl Clone for CreateContactOptions
impl Clone for CreateContactOptions
Source§fn clone(&self) -> CreateContactOptions
fn clone(&self) -> CreateContactOptions
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CreateContactOptions
impl Debug for CreateContactOptions
Auto Trait Implementations§
impl Freeze for CreateContactOptions
impl RefUnwindSafe for CreateContactOptions
impl Send for CreateContactOptions
impl Sync for CreateContactOptions
impl Unpin for CreateContactOptions
impl UnsafeUnpin for CreateContactOptions
impl UnwindSafe for CreateContactOptions
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