pub fn run_app_on<P, A>(
config: WindowConfig,
terminal: Terminal<WindowBackend<P>>,
app: A,
) -> Result<(), EventLoopError>Expand description
Same as run_app, but takes an already-built Terminal instead of a bare presenter.
run_app builds its Terminal internally (Terminal::new(WindowBackend::new(presenter)));
this is the lower-level entry for a caller that needs to configure the Terminal (or reach
into its WindowBackend) before the loop starts, which is impossible through run_app
alone.
See run_app’s “Resizing applies before update runs” and “Return contract differs on
wasm32” sections, and
https://main.retroglyph.dev/book/explanation/architecture.html#presenting-is-automatic:
this function shares all three behaviors.
§Errors
Returns EventLoopError if the event loop cannot be
created or fails while running.