FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    Disposable

    struct · ferroui-reactive · v0.5.0

    struct Disposable
    

    The factory of the common disposables (Disposable).

    View source

    Members

    empty

    fn empty() -> Rc<dyn IDisposable>
    

    A disposable that does nothing when disposed (Disposable.Empty). The instance is shared by the thread.

    Source

    create

    fn create(dispose: impl FnOnce() -> () + 'static) -> Rc<dyn IDisposable>
    

    A disposable that runs dispose the first time it is disposed (Disposable.Create).

    Source

    create_with_state

    fn create_with_state<S: 'static>(state: S, dispose: impl FnOnce(S) -> () + 'static) -> Rc<dyn IDisposable>
    

    A disposable that runs dispose with state the first time it is disposed (Disposable.Create<TState>).

    Source

    Trait implementations

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

    Availability

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