IItemsList
trait · ferroui-controls · v0.5.0
trait IItemsList
An untyped, indexable list of items that may notify of changes.
Members
key_index_mappingcountget_atindex_ofis_notifyingadd_collection_changedremove_collection_changedidentityas_any
key_index_mapping
fn key_index_mapping(self: &Self) -> Option<&dyn crate::IKeyIndexMapping>
The unique keys of the items, if the list provides them
(IKeyIndexMapping); None by default. An index is
never a key: a list without keys has none.
count
fn count(self: &Self) -> usize
The number of items.
get_at
fn get_at(self: &Self, index: usize) -> Option<BoxedValue>
The item at index. Panics if out of range.
index_of
fn index_of(self: &Self, item: &Option<BoxedValue>) -> i32
The index of the first item equal to item, or -1.
is_notifying
fn is_notifying(self: &Self) -> bool
Whether the list notifies of changes.
add_collection_changed
fn add_collection_changed(self: &Self, _handler: Rc<ItemsChangedHandler>) -> Option<u64>
Subscribes to changes. Returns the token for
remove_collection_changed, or
None if the list does not notify.
remove_collection_changed
fn remove_collection_changed(self: &Self, _token: u64)
Unsubscribes a handler.
identity
fn identity(self: &Self) -> Option<usize>
The identity of the collection, for a list that is a handle to a collection
(a FerroList): two handles to one collection are the same collection. None
for a list that is the collection itself, whose identity is its address.
as_any
fn as_any(self: &Self) -> &dyn Any
The collection as Any, to get back to the typed collection.
Trait implementations
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.