StyleChildren
struct · ferroui-base · v0.5.0
struct StyleChildren
The collection of child styles of a style.
The value is a shared handle: clones refer to the same collection, and handles compare by identity.
Members
count
fn count(self: &Self) -> usize
The number of child styles.
is_empty
fn is_empty(self: &Self) -> bool
get
fn get(self: &Self, index: usize) -> Rc<dyn IStyle>
The child style at index. Panics if out of range.
snapshot
fn snapshot(self: &Self) -> Rc<Vec<Rc<dyn IStyle>>>
A snapshot of the child styles.
add
fn add(self: &Self, item: impl Into<Rc<dyn IStyle>>)
Adds a child style.
insert
fn insert(self: &Self, index: usize, item: impl Into<Rc<dyn IStyle>>)
Inserts a child style.
remove_at
fn remove_at(self: &Self, index: usize)
Removes the child style at index.
remove
fn remove(self: &Self, item: impl Into<Rc<dyn IStyle>>) -> bool
Removes a child style. Returns whether it was present.
set
fn set(self: &Self, index: usize, item: impl Into<Rc<dyn IStyle>>)
Replaces the child style at index.
clear
fn clear(self: &Self)
Removes all child styles.
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafePropertyValueAnyValueClassDefaultsBorrow<T>BorrowMut<T>CloneToUninitInto<U>From<T>TryInto<U>TryFrom<U>AnyToOwnedErasedDestructorIntoEitherClonePartialEqDebugMarkupTypedValueTypeRegistration
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.