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.
Members
sizeget_atindex_ofcontainsappendinsert_atset_atremove_atremoveremove_at_endclearitemsreplace_all
size
fn size(self: &Self) -> usize
Size.
get_at
fn get_at(self: &Self, index: usize) -> Option<Ref<Visual>>
GetAt: the element at index, None when it is gone.
index_of
fn index_of(self: &Self, element: &Visual) -> Option<usize>
IndexOf.
contains
fn contains(self: &Self, element: &Visual) -> bool
Whether element is in the collection.
append
fn append(self: &Self, element: &Visual) -> Result<(), ThemeShadowError>
Append.
insert_at
fn insert_at(self: &Self, index: usize, element: &Visual) -> Result<(), ThemeShadowError>
InsertAt.
set_at
fn set_at(self: &Self, index: usize, element: &Visual) -> Result<(), ThemeShadowError>
SetAt.
remove_at
fn remove_at(self: &Self, index: usize) -> Result<(), ThemeShadowError>
RemoveAt.
remove
fn remove(self: &Self, element: &Visual) -> bool
Removes element; false when it is not in the collection.
remove_at_end
fn remove_at_end(self: &Self) -> Result<(), ThemeShadowError>
RemoveAtEnd.
clear
fn clear(self: &Self)
Clear.
items
fn items(self: &Self) -> Vec<Ref<Visual>>
GetMany from the start: the elements that are still alive.
replace_all
fn replace_all(self: &Self, elements: &[&Visual]) -> Result<(), ThemeShadowError>
ReplaceAll.
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeClassDefaultsBorrow<T>BorrowMut<T>Into<U>From<T>TryInto<U>TryFrom<U>AnyErasedDestructorIntoEither
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.