Disposable
struct · ferroui-base · v0.5.0
struct Disposable
Factory for common IDisposable implementations.
Members
empty
fn empty() -> Rc<dyn IDisposable>
A disposable that does nothing.
create
fn create(action: impl FnOnce() -> () + 'static) -> Rc<dyn IDisposable>
A disposable that runs action the first time it is disposed.
create_with_state
fn create_with_state<TState: 'static>(state: TState, dispose: impl FnOnce(TState) -> () + 'static) -> Rc<dyn IDisposable>
A disposable that gives state to dispose the first time it is
disposed.
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeClassDefaultsBorrow<T>BorrowMut<T>Into<U>From<T>TryInto<U>TryFrom<U>AnyErasedDestructorIntoEither
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.