FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    RefCountDisposable

    struct · ferroui-reactive · v0.5.0

    struct RefCountDisposable
    

    A disposable that disposes its underlying disposable once it has been disposed itself and all the dependent disposables it handed out have been disposed (RefCountDisposable).

    View source

    Members

    new

    fn new(disposable: Rc<dyn IDisposable>) -> Rc<Self>
    

    Counts the references to disposable.

    Source

    with_throw_when_disposed

    fn with_throw_when_disposed(disposable: Rc<dyn IDisposable>, throw_when_disposed: bool) -> Rc<Self>
    

    As new; with throw_when_disposed, asking a disposed instance for a dependent disposable panics (upstream throws ObjectDisposedException) instead of returning an empty one.

    Source

    get_disposable

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

    A dependent disposable, which keeps the underlying disposable alive until it is disposed (GetDisposable).

    Source

    Trait implementations

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

    Availability

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