FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    ISuspensionHost

    trait · ferroui-reactiveui · v0.5.0

    trait ISuspensionHost: IReactiveObject
    

    The events of the life of the process that the host operating system publishes, in one form (ISuspensionHost): subscribe to them to save and restore the state of the application when it is suspended and resumed.

    The observables abstract the terms of each platform ("launching", "activated", "closing") so that shared code persists its state without knowing the user-interface toolkit. Most applications call setup_default_suspend_resume at startup; the observables are settable so that a host can plug in its own monitoring.

    The state of the application is an object the application defines, type-erased here (app_state); create_new_app_state makes a fresh one on the first launch or after a crash.

    View source

    Members

    is_launching_new

    fn is_launching_new(self: &Self) -> Rc<dyn IObservable<()>>
    

    Ticks when the application is launched anew, after a crash or the first time: the application creates its state from scratch (IsLaunchingNew).

    Source

    set_is_launching_new

    fn set_is_launching_new(self: &Self, value: Rc<dyn IObservable<()>>)
    

    Sets is_launching_new.

    Source

    is_resuming

    fn is_resuming(self: &Self) -> Rc<dyn IObservable<()>>
    

    Ticks when the application resumes from the suspended state: it was running, but its process was destroyed (IsResuming).

    Source

    set_is_resuming

    fn set_is_resuming(self: &Self, value: Rc<dyn IObservable<()>>)
    

    Sets is_resuming.

    Source

    is_unpausing

    fn is_unpausing(self: &Self) -> Rc<dyn IObservable<()>>
    

    Ticks when the application is activated; the process may not have been running before (IsUnpausing).

    Source

    set_is_unpausing

    fn set_is_unpausing(self: &Self, value: Rc<dyn IObservable<()>>)
    

    Sets is_unpausing.

    Source

    should_persist_state

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

    Ticks when the application should persist its state; the value is disposed once the state is persisted (ShouldPersistState).

    Source

    set_should_persist_state

    fn set_should_persist_state(self: &Self, value: Rc<dyn IObservable<Rc<dyn IDisposable>>>)
    

    Sets should_persist_state.

    Source

    should_invalidate_state

    fn should_invalidate_state(self: &Self) -> Rc<dyn IObservable<()>>
    

    Ticks when the saved state should be deleted, usually after a crash (ShouldInvalidateState).

    Source

    set_should_invalidate_state

    fn set_should_invalidate_state(self: &Self, value: Rc<dyn IObservable<()>>)
    

    Sets should_invalidate_state.

    Source

    create_new_app_state

    fn create_new_app_state(self: &Self) -> Option<AppStateFactory>
    

    The function that creates a new state of the application (CreateNewAppState).

    Source

    set_create_new_app_state

    fn set_create_new_app_state(self: &Self, value: Option<AppStateFactory>)
    

    Sets create_new_app_state.

    Source

    app_state

    fn app_state(self: &Self) -> Option<Rc<dyn Any>>
    

    The current state of the application (AppState); see get_app_state for a typed view.

    Source

    set_app_state

    fn set_app_state(self: &Self, value: Option<Rc<dyn Any>>)
    

    Sets app_state.

    Source

    Trait implementations

    Availability

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