FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    UIElementWeakCollection

    struct · ferroui-base · v0.5.0

    struct UIElementWeakCollection
    

    A collection of elements held weakly (WinUI Microsoft.UI.Xaml.UIElementWeakCollection, IVector<UIElement>): an element that is gone reads as None and stays in the collection until it is removed.

    View source

    Members

    size

    fn size(self: &Self) -> usize
    

    Size.

    Source

    get_at

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

    GetAt: the element at index, None when it is gone.

    Source

    index_of

    fn index_of(self: &Self, element: &Visual) -> Option<usize>
    

    IndexOf.

    Source

    contains

    fn contains(self: &Self, element: &Visual) -> bool
    

    Whether element is in the collection.

    Source

    append

    fn append(self: &Self, element: &Visual) -> Result<(), ThemeShadowError>
    

    Append.

    Source

    insert_at

    fn insert_at(self: &Self, index: usize, element: &Visual) -> Result<(), ThemeShadowError>
    

    InsertAt.

    Source

    set_at

    fn set_at(self: &Self, index: usize, element: &Visual) -> Result<(), ThemeShadowError>
    

    SetAt.

    Source

    remove_at

    fn remove_at(self: &Self, index: usize) -> Result<(), ThemeShadowError>
    

    RemoveAt.

    Source

    remove

    fn remove(self: &Self, element: &Visual) -> bool
    

    Removes element; false when it is not in the collection.

    Source

    remove_at_end

    fn remove_at_end(self: &Self) -> Result<(), ThemeShadowError>
    

    RemoveAtEnd.

    Source

    clear

    fn clear(self: &Self)
    

    Clear.

    Source

    items

    fn items(self: &Self) -> Vec<Ref<Visual>>
    

    GetMany from the start: the elements that are still alive.

    Source

    replace_all

    fn replace_all(self: &Self, elements: &[&Visual]) -> Result<(), ThemeShadowError>
    

    ReplaceAll.

    Source

    Trait implementations

    • Send
    • Sync
    • Freeze
    • UnsafeUnpin
    • Unpin
    • UnwindSafe
    • RefUnwindSafe
    • ClassDefaults
    • Borrow<T>
    • BorrowMut<T>
    • Into<U>
    • From<T>
    • TryInto<U>
    • TryFrom<U>
    • Any
    • ErasedDestructor
    • IntoEither

    Availability

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