ContextDisposable
struct · ferroui-reactive · v0.5.0
struct ContextDisposable
A disposable whose disposal is posted to a context, a Schedule (ContextDisposable).
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)).
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
schedule
fn schedule(self: &Self) -> Option<&Arc<dyn Schedule>>
The schedule the disposal is posted to (Context), None for a deprecated context.
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
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeBorrow<T>BorrowMut<T>Into<U>From<T>TryInto<U>TryFrom<U>AnyIDisposableICancelable
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.