FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    SerialDisposableValue

    struct · ferroui-reactive · v0.5.0

    struct SerialDisposableValue
    

    A slot whose disposable can be replaced, disposing the previous one (SerialDisposableValue). A disposable assigned after the slot was disposed is disposed at once.

    View source

    Members

    new

    const fn new() -> Self
    

    Source

    is_disposed

    fn is_disposed(self: &Self) -> bool
    

    Source

    disposable

    fn disposable(self: &Self) -> Option<Rc<dyn IDisposable>>
    

    The current disposable, if any.

    Source

    set_disposable

    fn set_disposable(self: &Self, value: Option<Rc<dyn IDisposable>>)
    

    Replaces the disposable and disposes the previous one.

    Source

    try_set_first

    fn try_set_first(self: &Self, value: Rc<dyn IDisposable>) -> bool
    

    Assigns the first disposable; false when one was assigned already (TrySetFirst).

    Source

    dispose

    fn dispose(self: &Self)
    

    Source

    Trait implementations

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

    Availability

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