run_app

Function run_app 

Source
pub async fn run_app<T: EngineApp + 'static>()
Expand description

The run_app function effectively creates an runs the app given as a generic argument.

This function will automatically call the create function on startup just after the window is created and render engine initialized. This function will automatically call the start function just after the above create step. Then the once per frame, the apps update and render functions will be called. When an exit is request the loop will stop and then the exit function will be called before cleaning up all resources used by the render engine and this function. When an input is received through the event loop is first passed to the render engine for initial processing before the apps input function is called.

Examples found in repository?
examples/rotating_cube.rs (line 146)
146fn main() { run_app::<MainApp>(); }
More examples
Hide additional examples
examples/test_components.rs (line 178)
178fn main() { pollster::block_on(run_app::<App>()) }
examples/ui.rs (line 85)
85fn main() { pollster::block_on(run_app::<App>()) }