[][src]Struct zenkit::types::Element

pub struct Element {
    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>,
}

Field definition

Fields

id: IDshort_id: ShortIduuid: UUIDname: Stringdescription: Option<String>

undocumented

business_data: BusinessData

The business data

element_data: ElementData

The element data { placeholder: "", listUsers:Option }

is_primary: bool

true if this is a list's primary element

is_auto_created: bool

true if this element was created through an automatic process, such as an import, rather than user interaction

sort_order: f32

The sort order compared to other elements of the same list

visible: boolcreated_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: ElementCategoryId

The element category

list_id: ID

The ID of the list this element belongs to

visible_in_public_list: Option<bool>

undocumented

Implementations

impl Element[src]

pub fn get_description(&self) -> &str[src]

Returns the element description, or an empty string if none was provided

pub fn get_choice_id(&self, choice_name: &str) -> Result<ID, Error>[src]

lookup choice id from its name or uuid. Returns Error if there is no match

pub fn numeric_type(&self) -> Option<NumericType>[src]

Returns whether the numeric field is Integer or Decimal. Returns None if the field is not numeric

Trait Implementations

impl Debug for Element[src]

impl<'de> Deserialize<'de> for Element[src]

impl PartialEq<Element> for Element[src]

impl Serialize for Element[src]

impl StructuralPartialEq for Element[src]

impl ZKObjectID for Element[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.