FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    IList

    trait · ferroui-dynamic-data · v0.5.0

    trait IList<T: Clone + PartialEq>
    

    A list that the changes of a list can be applied to (System.Collections.Generic.IList<T>, with the forms of ListEx as provided methods).

    View source

    Members

    count

    fn count(self: &Self) -> usize
    

    The number of items (Count).

    Source

    get

    fn get(self: &Self, index: usize) -> T
    

    The item at index (the indexer's getter).

    Source

    set

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

    Replaces the item at index (the indexer's setter).

    Source

    insert

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

    Inserts an item (Insert).

    Source

    remove_at

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

    Removes the item at index (RemoveAt).

    Source

    clear

    fn clear(self: &mut Self)
    

    Removes every item (Clear).

    Source

    add

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

    Adds an item at the end (Add).

    Source

    index_of

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

    The index of item (IndexOf).

    Source

    index_of_with

    fn index_of_with(self: &Self, item: &T, comparer: &dyn Fn(&T, &T) -> bool) -> Option<usize>
    

    The index of item by comparer (ListEx.IndexOf(IEnumerable, T, IEqualityComparer)).

    Source

    remove

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

    Removes item; false when it is not in the list (Remove).

    Source

    add_range

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

    Adds the items at the end (ListEx.AddRange): one by one unless the list adds ranges.

    Source

    add_or_insert_range

    fn add_or_insert_range(self: &mut Self, items: Vec<T>, index: Option<usize>)
    

    Inserts the items at index, or adds them without an index (ListEx.AddOrInsertRange): in reverse order at the index unless the list inserts ranges, as upstream does.

    Source

    remove_range

    fn remove_range(self: &mut Self, _index: usize, _count: usize)
    

    Removes count items from index (ListEx.RemoveRange).

    Panics

    For a list without ranges (NotSupportedException).

    Source

    supports_ranges

    fn supports_ranges(self: &Self) -> bool
    

    Whether the list removes ranges at once (List<T> or IExtendedList<T>).

    Source

    move_item

    fn move_item(self: &mut Self, original: usize, destination: usize)
    

    Moves the item at original to destination (the Moved case of ListEx.Clone).

    Source

    refresh_at

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

    Reports a refresh of the item at index (the Refresh case of ListEx.Clone): the item is removed and inserted again unless the list reports refreshes.

    Source

    Trait implementations

    Availability

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