FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    IFerroList

    trait · ferroui-base · v0.5.0

    trait IFerroList<T>: IFerroReadOnlyList<T>
    

    A notifying list.

    The members of the list contract it extends (add, insert, remove, search) are part of the trait. Ranges are passed as vectors, so that the trait can be used as an object.

    View source

    Members

    set

    fn set(self: &Self, index: usize, value: T)
    

    Sets the element at the specified index.

    Source

    add

    fn add(self: &Self, item: T)
    

    Adds an item to the collection.

    Source

    insert

    fn insert(self: &Self, index: usize, item: T)
    

    Inserts an item at the specified index.

    Source

    remove_at

    fn remove_at(self: &Self, index: usize)
    

    Removes the item at the specified index.

    Source

    clear

    fn clear(self: &Self)
    

    Removes all items from the collection.

    Source

    contains

    fn contains(self: &Self, item: &T) -> bool
    

    Tests whether the collection contains an item.

    Source

    index_of

    fn index_of(self: &Self, item: &T) -> Option<usize>
    

    The index of an item in the collection.

    Source

    remove

    fn remove(self: &Self, item: &T) -> bool
    

    Removes an item from the collection. Returns true if it was present.

    Source

    add_range

    fn add_range(self: &Self, items: Vec<T>)
    

    Adds multiple items to the collection.

    Source

    insert_range

    fn insert_range(self: &Self, index: usize, items: Vec<T>)
    

    Inserts multiple items at the specified index.

    Source

    move_item

    fn move_item(self: &Self, old_index: usize, new_index: usize)
    

    Moves an item to a new index.

    Source

    move_range

    fn move_range(self: &Self, old_index: usize, count: usize, new_index: usize)
    

    Moves multiple items to a new index.

    Source

    remove_all

    fn remove_all(self: &Self, items: Vec<T>)
    

    Removes multiple items from the collection.

    Source

    remove_range

    fn remove_range(self: &Self, index: usize, count: usize)
    

    Removes a range of elements from the collection.

    Source

    Trait implementations

    Availability

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