FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    DisposableAction

    struct · ferroui-xaml-interactivity · v0.5.0

    struct DisposableAction
    

    Represents an IDisposable that executes a specified action when disposed.

    View source

    Members

    new

    fn new(dispose: impl Fn() -> () + 'static) -> Self
    

    Creates a disposable that executes dispose when disposed.

    Source

    empty

    fn empty() -> Rc<dyn IDisposable>
    

    An empty disposable that does nothing when disposed.

    Source

    create

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

    Creates a new DisposableAction that executes the specified action when disposed.

    Source

    Trait implementations

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

    Availability

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