Skip to main content

WindowRunner

Trait WindowRunner 

Source
pub trait WindowRunner: WindowProvider {
    // Required method
    fn run(self, on_frame: impl FnMut() + 'static);
}
Expand description

A WindowProvider that can drive the application’s main loop.

The run method blocks (or hands off control to the OS event loop) and calls on_frame once per frame.

Required Methods§

Source

fn run(self, on_frame: impl FnMut() + 'static)

Start the event loop, calling on_frame each time a new frame should be rendered.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§