save_window_state

Function save_window_state 

Source
pub fn save_window_state(
    app_name: &str,
    state: &WindowState,
) -> Result<(), PersistenceError>
Expand description

Save window state to the platform-specific config directory.

This function should be called when the application is closing (typically in response to a CloseRequested window event). It creates the config directory if it doesn’t exist.

§Arguments

  • app_name - Application identifier used to namespace the config file
  • state - The WindowState to persist