pub struct Application { /* private fields */ }
Expand description
Use this to initialize and start your application with.
Implementations§
Source§impl Application
impl Application
Sourcepub fn finish(self)
pub fn finish(self)
Shuts down other processes and performs any necessary clean-up code.
This is useful if you main function doesn’t exit naturally.
If you call std::process::exit
, the variables currently available
don’t get dropped. This is problematic because Browser Window needs to
shut down properly. Call this if you are using exit
or doing something
else to kill the process.
Sourcepub fn initialize(settings: &ApplicationSettings) -> Result<Application>
pub fn initialize(settings: &ApplicationSettings) -> Result<Application>
In order to use the Browser Window API, you need to initialize Browser
Window at the very start of your application. Preferably on the first
line of your main
function.
§Warning
This will open another process of your application. Therefore, any code that will be placed before initialization will also be executed on all other processes. This is generally unnecessary.
§Arguments
settings
- Some settings that allow you to tweak some application
behaviors. Use Settings::default()
for default settings
that work for most people.