FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    CompositeDisposable

    struct · ferroui-base · v0.5.0

    struct CompositeDisposable
    

    A group of disposables that are disposed together.

    View source

    Members

    new

    fn new() -> Self
    

    Source

    with_capacity

    fn with_capacity(capacity: usize) -> Self
    

    Source

    from_disposables

    fn from_disposables(disposables: impl IntoIterator<Item = Rc<dyn IDisposable>>) -> Self
    

    Source

    is_disposed

    fn is_disposed(self: &Self) -> bool
    

    Source

    count

    fn count(self: &Self) -> usize
    

    Source

    add

    fn add(self: &Self, item: Rc<dyn IDisposable>)
    

    Adds a disposable to the group, or disposes it immediately if the group has already been disposed.

    Source

    remove

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

    Removes and disposes the first occurrence of item.

    Source

    contains

    fn contains(self: &Self, item: &Rc<dyn IDisposable>) -> bool
    

    Whether the group contains item. A disposed group is empty.

    Source

    copy_to

    fn copy_to(self: &Self, array: &mut [Rc<dyn IDisposable>], array_index: usize)
    

    Copies the disposables of the group over the items of array that start at array_index. A disposed group copies nothing.

    Panics when array_index is outside of the array or the array has not enough room after it.

    Source

    is_read_only

    fn is_read_only(self: &Self) -> bool
    

    Always false.

    Source

    get_enumerator

    fn get_enumerator(self: &Self) -> std::vec::IntoIter<Rc<dyn IDisposable>>
    

    Enumerates a copy of the disposables of the group. A disposed group is empty.

    Source

    clear

    fn clear(self: &Self)
    

    Disposes and removes all items without disposing the group itself.

    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
    • Default
    • IDisposable

    Availability

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