FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    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.

    View source

    Members

    count

    fn count(self: &Self) -> usize
    

    The number of child styles.

    Source

    is_empty

    fn is_empty(self: &Self) -> bool
    

    Source

    get

    fn get(self: &Self, index: usize) -> Rc<dyn IStyle>
    

    The child style at index. Panics if out of range.

    Source

    snapshot

    fn snapshot(self: &Self) -> Rc<Vec<Rc<dyn IStyle>>>
    

    A snapshot of the child styles.

    Source

    add

    fn add(self: &Self, item: impl Into<Rc<dyn IStyle>>)
    

    Adds a child style.

    Source

    insert

    fn insert(self: &Self, index: usize, item: impl Into<Rc<dyn IStyle>>)
    

    Inserts a child style.

    Source

    remove_at

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

    Removes the child style at index.

    Source

    remove

    fn remove(self: &Self, item: impl Into<Rc<dyn IStyle>>) -> bool
    

    Removes a child style. Returns whether it was present.

    Source

    set

    fn set(self: &Self, index: usize, item: impl Into<Rc<dyn IStyle>>)
    

    Replaces the child style at index.

    Source

    clear

    fn clear(self: &Self)
    

    Removes all child styles.

    Source

    Trait implementations

    Availability

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