Struct browser_window::application::Runtime [−][src]
pub struct Runtime { /* fields omitted */ }
Expand description
The runtime to run the application with.
This runtime will run until all windows have been closed and the (async) closure given to the run*
functions have ended.
Implementations
Run the main loop and executes the given closure on it.
Arguments
on_ready
- This closure will be called when the runtime has initialized, and will provide the caller with an application handle.
Reserved Codes
-1 is used as the return code for when the main thread panicked during a delegated closure.
Runs the main loop and executes the given future within that loop.
This function exits when the future finishes or when exit
is called.
Keep in mind that calls to async functions or futures may not necessarily finish. Exiting the application causes the runtime to stop, and it doesn’t necessarily complete all waiting tasks.
Reserved Codes
The same reserved codes apply as run
.