Function run_app

Source
pub fn run_app<A: ApplicationHandler + 'static>(
    app: A,
    control_flow: ControlFlow,
) -> Result<(), EventLoopError>
Expand description

Creates a winit event loop, applies control_flow, and runs the handler.

The call blocks until the event loop exits. On Linux, the shared runner also installs Ctrl+C wake-up handling and normalizes winit’s teardown status-one quirk.

§Errors

Propagates event-loop construction and non-normalized run errors.

§Examples

use ailloli_ui_winit::run_app;
use winit::{application::ApplicationHandler, event_loop::ControlFlow};
fn run<A: ApplicationHandler + 'static>(app: A) {
    run_app(app, ControlFlow::Wait).unwrap();
}