[][src]Struct zenkit::types::ListInfo

pub struct ListInfo { /* fields omitted */ }

A read-only reference to a List and its fields To modify list field definitions, use methods of workspace ..

Implementations

impl ListInfo[src]

pub fn list(&self) -> &List[src]

Returns the inner list. You can also use the implied deref.

pub fn get_id(&self) -> ID[src]

Returns the unique (int) ID of the list

pub fn get_uuid(&self) -> &UUID[src]

Returns the uuid of the list

pub fn has_id(&self, id: &str) -> bool[src]

Returns true if the list has the id, uuid, shortId, or name of the parameter

pub async fn get_item<A: Into<AllId>>(
    &self,
    item_uid: A
) -> Result<Rc<Item<'_>>, Error>
[src]

Returns a list item by id or uuid, or None if it doesn't exist

pub fn get_field(&self, field_id: &str) -> Result<&Field, Error>[src]

Returns field (definition) given its name, id, or uuid

pub fn fields(&self) -> &Vec<Field>

Notable traits for Vec<u8, Global>

impl Write for Vec<u8, Global>
[src]

Returns vec of fields

pub async fn get_items(&self) -> Result<Vec<Rc<Item<'_>>>, Error>[src]

fetch all items of the list, unsorted

pub async fn create_item(
    &self,
    values: Vec<FieldSetVal>
) -> Result<Rc<Item<'_>>, Error>
[src]

Create a new list item. list parameter is list name, uuid, or id as string, For values, you can use the fset_* helper functions (UpdateAction not required for new items) Returned item has additional fields filled in by system (id, uuid, created_at, etc.)

pub async fn update_item(
    &self,
    item_id: ID,
    values: Vec<FieldSetVal>
) -> Result<Rc<Item<'_>>, Error>
[src]

Updates an item with one or more field changes For values, you should use the fup_* (rather than fset_*) helper functions to ensure UpdateAction is set correctly. List and fields are 'Any' type: name, id, or uuid. For Person field, value can be name. For choice field, value can be choice (category) name. Returns updated object

pub async fn add_item_comment<A: Into<AllId>>(
    &self,
    item_allid: A,
    message: String
) -> Result<(), Error>
[src]

Adds comment to the item

pub async fn add_list_comment(&self, message: String) -> Result<(), Error>[src]

Adds comment to the list

Methods from Deref<Target = List>

pub fn has_id(&self, id: &str) -> bool[src]

Returns true if the list has the id, uuid, shortId, or name of the parameter

Trait Implementations

impl Debug for ListInfo[src]

impl Deref for ListInfo[src]

Access inner list

type Target = List

The resulting type after dereferencing.

pub fn deref(&self) -> &List[src]

Access inner list

impl Display for ListInfo[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> 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> ToString for T where
    T: Display + ?Sized
[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.