#[non_exhaustive]pub struct EventOptions {
pub event_properties: Map<String, Value>,
pub mailing_lists: BTreeMap<String, bool>,
pub contact_properties: Map<String, Value>,
pub idempotency_key: Option<String>,
}Expand description
Optional parts of send_event.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.event_properties: Map<String, Value>Event properties, available in emails the event sends.
mailing_lists: BTreeMap<String, bool>Mailing list IDs mapped to whether the contact should be on that list.
contact_properties: Map<String, Value>Contact properties to update, sent as top-level keys.
idempotency_key: Option<String>Idempotency key, up to 100 characters. A UUID v4 is generated when unset.
Implementations§
Source§impl EventOptions
impl EventOptions
Sourcepub fn event_property(
self,
key: impl Into<String>,
value: impl Into<Value>,
) -> Self
pub fn event_property( self, key: impl Into<String>, value: impl Into<Value>, ) -> Self
Set an event property.
Sourcepub fn mailing_list(self, list_id: impl Into<String>, subscribed: bool) -> Self
pub fn mailing_list(self, list_id: impl Into<String>, subscribed: bool) -> Self
Add the contact to (true) or remove it from (false) a mailing list.
Sourcepub fn contact_property(
self,
key: impl Into<String>,
value: impl Into<Value>,
) -> Self
pub fn contact_property( self, key: impl Into<String>, value: impl Into<Value>, ) -> Self
Update a contact property.
Sourcepub fn idempotency_key(self, key: impl Into<String>) -> Self
pub fn idempotency_key(self, key: impl Into<String>) -> Self
Set the idempotency key.
Trait Implementations§
Source§impl Clone for EventOptions
impl Clone for EventOptions
Source§impl Debug for EventOptions
impl Debug for EventOptions
Source§impl Default for EventOptions
impl Default for EventOptions
Source§impl PartialEq for EventOptions
impl PartialEq for EventOptions
impl StructuralPartialEq for EventOptions
Auto Trait Implementations§
impl Freeze for EventOptions
impl RefUnwindSafe for EventOptions
impl Send for EventOptions
impl Sync for EventOptions
impl Unpin for EventOptions
impl UnsafeUnpin for EventOptions
impl UnwindSafe for EventOptions
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