pub struct Attribute {
pub name: String,
pub attr_type: String,
pub value: Value,
}Expand description
A custom attribute to attach when creating or updating a lead.
Fields§
§name: StringAttribute name.
attr_type: StringAttribute type tag ("text", "number", "bool", "list", "object").
value: ValueJSON-serialisable value.
Implementations§
Source§impl Attribute
impl Attribute
Sourcepub fn text(name: &str, value: &str) -> Self
pub fn text(name: &str, value: &str) -> Self
Create a text attribute.
ⓘ
Attribute::text("industry", "Software")Sourcepub fn number(name: &str, value: f64) -> Self
pub fn number(name: &str, value: f64) -> Self
Create a number attribute.
ⓘ
Attribute::number("employees", 500.0)Sourcepub fn bool(name: &str, value: bool) -> Self
pub fn bool(name: &str, value: bool) -> Self
Create a boolean attribute.
ⓘ
Attribute::bool("verified", true)Trait Implementations§
Source§impl<'de> Deserialize<'de> for Attribute
impl<'de> Deserialize<'de> for Attribute
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for Attribute
impl RefUnwindSafe for Attribute
impl Send for Attribute
impl Sync for Attribute
impl Unpin for Attribute
impl UnsafeUnpin for Attribute
impl UnwindSafe for Attribute
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