FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    IItemsList

    trait · ferroui-controls · v0.5.0

    trait IItemsList
    

    An untyped, indexable list of items that may notify of changes.

    View source

    Members

    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.

    Source

    count

    fn count(self: &Self) -> usize
    

    The number of items.

    Source

    get_at

    fn get_at(self: &Self, index: usize) -> Option<BoxedValue>
    

    The item at index. Panics if out of range.

    Source

    index_of

    fn index_of(self: &Self, item: &Option<BoxedValue>) -> i32
    

    The index of the first item equal to item, or -1.

    Source

    is_notifying

    fn is_notifying(self: &Self) -> bool
    

    Whether the list notifies of changes.

    Source

    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.

    Source

    remove_collection_changed

    fn remove_collection_changed(self: &Self, _token: u64)
    

    Unsubscribes a handler.

    Source

    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.

    Source

    as_any

    fn as_any(self: &Self) -> &dyn Any
    

    The collection as Any, to get back to the typed collection.

    Source

    Trait implementations

    Availability

    Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.