FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    ContextDisposable

    struct · ferroui-reactive · v0.5.0

    struct ContextDisposable
    

    A disposable whose disposal is posted to a context, a Schedule (ContextDisposable).

    View source

    Members

    with_schedule

    fn with_schedule(schedule: Arc<dyn Schedule>, disposable: Rc<dyn IDisposable>) -> Rc<Self>
    

    Disposes disposable on schedule when it is disposed (ContextDisposable(SynchronizationContext, IDisposable)).

    Source

    new

    fn new(context: Arc<dyn SynchronizationContext>, disposable: Rc<dyn IDisposable>) -> Rc<Self>
    

    Disposes disposable on context when it is disposed (ContextDisposable(SynchronizationContext, IDisposable)).

    Deprecated since 0.5.0. use ContextDisposable::with_schedule

    Source

    schedule

    fn schedule(self: &Self) -> Option<&Arc<dyn Schedule>>
    

    The schedule the disposal is posted to (Context), None for a deprecated context.

    Source

    context

    fn context(self: &Self) -> &Arc<dyn SynchronizationContext>
    

    The context the disposal is posted to (Context).

    Panics

    When the disposable was made with a schedule (with_schedule).

    Deprecated since 0.5.0. use ContextDisposable::schedule

    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.