ItemCollection
struct · ferroui-controls · v0.5.0
struct ItemCollection
Holds the list of items that constitute the content of an
ItemsControl.
The value is a shared handle: clones refer to the same collection, and handles compare by identity.
Members
view
fn view(self: &Self) -> &Rc<ItemsSourceView>
The read-only view of the collection.
set
fn set(self: &Self, index: usize, value: Option<BoxedValue>)
Replaces the item at the specified index.
Panics if the collection is in items source mode.
is_read_only
fn is_read_only(self: &Self) -> bool
Whether the collection is in items source mode.
add
fn add(self: &Self, value: Option<BoxedValue>) -> i32
Adds an item to the items control.
Returns the position into which the new element was inserted. Panics if the collection is in items source mode.
clear
fn clear(self: &Self)
Clears the collection and releases the references on all items currently in the collection.
Panics if the collection is in items source mode.
insert
fn insert(self: &Self, index: usize, value: Option<BoxedValue>)
Inserts an element into the collection at the specified index.
Panics if the collection is in items source mode.
remove_at
fn remove_at(self: &Self, index: usize)
Removes the item at the specified index of the collection or view.
Panics if the collection is in items source mode.
remove
fn remove(self: &Self, value: &Option<BoxedValue>) -> bool
Removes the specified item reference from the collection or view. Returns true if the item was removed.
Panics if the collection is in items source mode.
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeBorrow<T>BorrowMut<T>CloneToUninitInto<U>From<T>TryInto<U>TryFrom<U>ReceiverAnyToOwnedPropertyValueAnyValueClassDefaultsErasedDestructorIntoEitherMarkupTypedValueTypeRegistrationClonePartialEqDebugDeref
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.