pub struct Element {Show 17 fields
pub id: ID,
pub short_id: ShortId,
pub uuid: UUID,
pub name: String,
pub description: Option<String>,
pub business_data: BusinessData,
pub element_data: ElementData,
pub is_primary: bool,
pub is_auto_created: bool,
pub sort_order: f32,
pub visible: bool,
pub created_at: DateTime<Utc>,
pub updated_at: DateTime<Utc>,
pub deprecated_at: Option<DateTime<Utc>>,
pub element_category: ElementCategoryId,
pub list_id: ID,
pub visible_in_public_list: Option<bool>,
}Expand description
Field definition
Fields§
§id: ID§short_id: ShortId§uuid: UUID§name: String§description: Option<String>undocumented
business_data: BusinessDataThe business data
element_data: ElementDataThe element data { placeholder: “”, listUsers:Option
is_primary: booltrue if this is a list’s primary element
is_auto_created: booltrue if this element was created through an automatic process, such as an import, rather than user interaction
sort_order: f32The sort order compared to other elements of the same list
visible: bool§created_at: DateTime<Utc>The timestamp at which this element was created
updated_at: DateTime<Utc>The timestamp at which this element was last updated
deprecated_at: Option<DateTime<Utc>>The timestamp at which this element was deprecated. Is null if not deprecated
element_category: ElementCategoryIdThe element category
list_id: IDThe ID of the list this element belongs to
visible_in_public_list: Option<bool>undocumented
Implementations§
Source§impl Element
impl Element
Sourcepub fn get_description(&self) -> &str
pub fn get_description(&self) -> &str
Returns the element description, or an empty string if none was provided
Sourcepub fn get_choice_id(&self, choice_name: &str) -> Result<ID, Error>
pub fn get_choice_id(&self, choice_name: &str) -> Result<ID, Error>
lookup choice id from its name or uuid. Returns Error if there is no match
Sourcepub fn numeric_type(&self) -> Option<NumericType>
pub fn numeric_type(&self) -> Option<NumericType>
Returns whether the numeric field is Integer or Decimal. Returns None if the field is not numeric