SuspensionHostExtensions
trait · ferroui-reactiveui · v0.5.0
trait SuspensionHostExtensions
The state of the application of a suspension host, and the default handling of its suspension
(the extension members of ISuspensionHost in SuspensionHostExtensions), on its shared
handle.
Members
get_app_state
fn get_app_state<T: 'static>(self: &Self) -> Option<Rc<T>>
The state of the application as a T, loaded first when the setup armed a load and it has
not run yet (GetAppState<T>()); None when there is no state.
Panics when the state is of another type (InvalidCastException).
observe_app_state
fn observe_app_state<T: 'static>(self: &Self) -> Rc<dyn IObservable<Rc<T>>>
The state of the application as a T: the current one on subscription, then each one set;
a state that is None or of another type is skipped (ObserveAppState<T>()).
setup_default_suspend_resume
fn setup_default_suspend_resume(self: &Self) -> Rc<dyn IDisposable>
Sets up the default suspension and resumption with the driver registered in AppLocator
(SetupDefaultSuspendResume()); see
setup_default_suspend_resume_with.
setup_default_suspend_resume_with
fn setup_default_suspend_resume_with(self: &Self, driver: Option<Rc<dyn ISuspensionDriver>>) -> Rc<dyn IDisposable>
Sets up the default suspension and resumption with driver, or the one registered in
AppLocator as dyn ISuspensionDriver when None (SetupDefaultSuspendResume(ISuspensionDriver?)):
the state is loaded once, when the application launches or resumes, or before it is first
read or saved, and created anew when there is none or the load fails; it is saved when the
host says it should persist, and invalidated when it says so. Without a driver, an error is
logged and nothing is set up.
Trait implementations
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.