[−][src]Struct zenkit::Item
Item in a list
Implementations
impl<'li> Item<'li>[src]
pub fn as_entry(&self) -> &Entry[src]
returns reference to the inner entry
pub fn get_id(&self) -> ID[src]
return entry id
pub fn get_uuid(&self) -> &UUID[src]
Returns entry uuid
pub fn get_field(&self, field_id: &str) -> Result<&Field, Error>[src]
Returns field (definition) given its name, id, or uuid
pub fn get_text_value(&self, fname: &str) -> Result<Option<&str>, Error>[src]
Returns value of text field. or None if not defined fname parameter may be field name, id, or uuid
pub fn take_text_value(&mut self, fname: &str) -> Option<String>[src]
If text field is defined, returns owned string This can be useful to avoid memory allocation if the string field is expected to be large
pub fn get_int_value(&self, fname: &str) -> Result<Option<i64>, Error>[src]
Returns value of integer field as i64. or None if not defined fname parameter may be field name, id, or uuid
pub fn get_float_value(&self, fname: &str) -> Result<Option<f64>, Error>[src]
Returns value of float field. or None if not defined fname parameter may be field name, id, or uuid
pub fn get_date_value(&self, fname: &str) -> Result<Option<&str>, Error>[src]
Returns value of date field. or None if not defined fname parameter may be field name, id, or uuid
pub fn get_person_names(&self, fname: &str) -> Result<Vec<&str>, Error>[src]
Returns display names of persons in field value. fname parameter may be field name, id, or uuid
pub fn get_person_ids(&self, fname: &str) -> Result<Vec<ID>, Error>[src]
Returns IDs of persons in field value. fname parameter may be field name, id, or uuid
pub fn get_references(&self, fname: &str) -> Result<Vec<&str>, Error>[src]
Returns uuids of referred objects in field value. fname parameter may be field name, id, or uuid
pub fn get_choices(&self, fname: &str) -> Result<Vec<&str>, Error>[src]
Returns array of choice (aka label/category) values. Array could be empty if none are selected
pub fn get_choice(&self, fname: &str) -> Result<Option<&str>, Error>[src]
Returns single choice value, or None if unselected. This will return an error if multiple values are selected, which would mean that the programmer believed the field had multiple-choices disabled, and they were enabled in the UI.
Methods from Deref<Target = Entry>
pub fn get_text_value(&self, field_uuid: &str) -> Result<Option<&str>, Error>[src]
Returns value of text string or None if undefined
pub fn get_int_value(&self, field_uuid: &str) -> Result<Option<i64>, Error>[src]
Returns int value of numeric field
pub fn get_float_value(&self, field_uuid: &str) -> Result<Option<f64>, Error>[src]
Returns float value of numeric field
pub fn get_date_value(&self, field_uuid: &str) -> Result<Option<&str>, Error>[src]
Returns value of date string or None if undefined
pub fn get_category_names(&self, field_uuid: &str) -> Result<Vec<&str>, Error>[src]
Returns category value(s) (as strings)
pub fn get_category_ids(&self, field_uuid: &str) -> Result<Vec<ID>, Error>[src]
Returns category ids
pub fn get_person_names(&self, field_uuid: &str) -> Result<Vec<&str>, Error>[src]
Returns display names of people or empty array if no people (or invalid field)
pub fn get_person_ids(&self, field_uuid: &str) -> Result<Vec<ID>, Error>[src]
Returns IDs of people or empty array if no people (or invalid field)
pub fn get_references(&self, field_uuid: &str) -> Result<Vec<&str>, Error>[src]
Returns UUIDs of referent items, or empty array
Trait Implementations
Auto Trait Implementations
impl<'li> RefUnwindSafe for Item<'li>
impl<'li> Send for Item<'li>
impl<'li> Sync for Item<'li>
impl<'li> Unpin for Item<'li>
impl<'li> UnwindSafe for Item<'li>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T> Instrument for T[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>[src]
pub fn in_current_span(self) -> Instrumented<Self>[src]
impl<T> Instrument for T[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>[src]
pub fn in_current_span(self) -> Instrumented<Self>[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,